[2008] Dotfuscator Breaks Resource Stream?

Feb 3, 2009

When I use Dotfuscator Enhanced Community Edition to dotfuscate one of my programs, it breaks the part of my program that takes an ebmbedded GZIP file and decompresses it to a normal stream which is then written to a file. Here is the code that dies:

VB
Dim Stream As New GZipStream(Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(MyNameSpace & "." & EmbeddedResource), CompressionMode.Decompress)

I did some investigating by putting in messagebox outputs of the variables and it seems the reason it dies is because MyNameSpace is a blank string. This global variable is defined early on in the program as such:

VB
Public MyNameSpace As String = System.Reflection.Assembly.GetEntryAssembly().EntryPoint.DeclaringType.Namespace()

So what I need is either another way of accessing the root namespace, another way of getting to an ebmbedded resource or a way to make Dotfuscator not destroy that namespace. I did think about using My.Resources.... but the problem with that is that I can't pass the string "EmbeddedResource" to the subroutine - I'd have to do the files all in individual lines I think.Also, a side question: The only enhancement I can ever find with the Enhanced edition of Dotfuscator is "Deep Visual Studio Integration" but I cannot see any evidence of this. I mean there's a button in the Tools menu to start Dotfuscator but that's not what I'd call "deep integration". I assumed it meant you could tell it to automatically dotfuscate when compiling but I can't find any documentation on how to do this.

View 2 Replies


ADVERTISEMENT

.NET 2008 Get Resource File As IO.Stream?

Jul 5, 2010

I am developing a VB.NET 2008 application, consisting of a main EXE application and several resource DLLs.

I need two functions for the DLL:

1) one function to get a list of all files in the resources of the DLL.

2) one function to return 'by name' a resource file as a System.IO.Stream type.

NOTE: The files will not be "Embedded Resource" (this doubles the size of the DLL), so I think cannot use 'GetManifestResourceStream'.

[Code]...

View 1 Replies

2008 : Get Resource File As IO.Stream?

Jul 6, 2010

I am developing a VB.NET 2008 application, consisting of a main EXE application and several resource DLLs.I am trouble with two functions for the DLL:

1) one function to get a list of all files in the resources of the DLL.

2) one function to return 'by name' a resource file as a System.IO.Stream type.

NOTE: The files will not be "Embedded Resource" (this doubles the size of the DLL), so I think cannot use 'GetManifestResourceStream'.

I currently use:

Return New System.IO.MemoryStream(My.Resources.MyFileName)

but I want it to be called by name.I am adding the resources using the VS 2008 "Resources" tab, from the My Project screen, I'm not manually editing Resources.resxAs I said before, it works with:

Return New System.IO.MemoryStream(My.Resources.MyFileName)

but I need to get the resources by name, which also works by using

GetMAnifestResourceStream

but this requires to set the resources Build Action to "Embedded Resource", which doubles the size of my DLL file.I currently use "None" as Build Action, but I can use any Build Action that does not increase the file size more than the actual resources size.

View 2 Replies

Get Resource File As IO.Stream?

Jul 5, 2010

I am developing a VB.NET 2008 application, consisting of a main EXE application and several resource DLLs.

I need two functions for the DLL:

1) one function to get a list of all files in the resources of the DLL.

2) one function to return 'by name' a resource file as a System.IO.Stream type.[code]...

View 8 Replies

C# - StringReader Or Memory Stream Which Is Resource Friendly?

Jul 11, 2011

I have a module which will be responsible for parsing CSV data received from different user via a website interface, and I have to parse that CSV. I was considering to use, TextFieldParser for it.

But before I could implement I was considering what shall be a better approach...

Generating MemoryStream from data received,
or initialising a StringReader from the same input string.

View 1 Replies

VS 2008 - How To Maintain Line Breaks In DB Column

Nov 30, 2011

I am reading a field from my database that has line breaks in it and displaying it on an aspx page. I want to maintain the line breaks on the page. I believe this is more of a VB.NET issue than a DB problem. [URL]

So this is what I tried:
If IsDBNull(CourseHours.Value) Then
EventDesription.CourseHours = ""
EventDesription.CourseHours1 = ""
EventDesription.CourseHours2 = ""
EventDesription.CourseHours3 = ""
[Code] .....

I am pretty sure that CourseHours.Value contains the cr-lf's I am looking for. I attached a screen shot of my debugging session. When I query CourseHours.Value I see boxes or squares which I believe is signitying CR-LF. But my split is only ending up with one array element and it is a long string with all the course hours concatenated. What do I need to Split on?

View 8 Replies

IDE :: Where Is The Dotfuscator In VB 2010

May 16, 2011

I have been using Dotfuscator for years with VB 2005 without a problem. I remember, vaguely, that it first came with a very simply one that we can upgrade to Community Edition without any cost (which I did). And once it is updated, it is pretty simple to do in my VB 2005. First I build the project as usual, then I make a new Dotfuscated Project from New Project Menu (which the Community Edition automatically add itself to, in VB 2005). I can't find the Dotfuscator at all. While, in the Pre-Emptive website, it is said that it is included free in Visual Studio 2010. How can I dotfuscate my project in VB 2010?

View 1 Replies

Casting After Obfuscation With Dotfuscator?

Mar 1, 2010

I'm trying to obfuscate some VB.NET 2003 app.The resulting assemblyes are obfuscated and "run" with some errors.I cleaned all potential reflection problems, but I'm not being able to read the selected value of a combobox.

I load the Combobox using their Datasource properties, using a collection of "VTPair" (a class created by me with 2 properties: one of string type and other of object type to store the value)

This combobox handle pairs like "Male | M" or "Female | F".When trying to see what is selected, I use if mycombo1.SelectedValue = "M" then.This code, after obfuscation, throws me an exception that cannot cast type "XX" to string "M".

So, I changed the code to something more correct, explicitly casting the selected value to String:

if ctype(mycombo1.SelectedValue,string) = "M" then But the error is the same.Debugin my original code, the SelectedValue property is of type "Object" but it is a string.I tried using the ComboBox.SelectedItem property that is also an object but this time what is inside is of type "VTPair" (my own class) and then trying to access its "Value" property (which is of type Object) and trying to cast to string fails again.

Does anyone have an idea to "translate" this piece of code to work OK after Dotfucate it?

View 2 Replies

Encrypt The VB2008 Code With Dotfuscator

Jun 16, 2009

I have forgotten the right procedure to encrypt the VB2008 code with dotfuscator community edition, may you explain the way to use it (the dotfuscator) step by step?

View 2 Replies

How Useful Is Dotfuscator Free Community Edition

Jan 14, 2010

how useful is dotfuscator free community edition? I applied it on my application and then checked the assembly using the Red Gate's .net reflector. It seems dotfuscator just changed the names of modules,classes and functions. once you know where to look( module or the class) , code was pretty much visible.Basically I want to secure my .net applications and to prevent them from being disassembled in to meaning-full code.

View 5 Replies

VS 2010 Packaging A Dotfuscator Assembly?

Mar 17, 2011

I have developed an app and an installer for it and everything works fine. I now feel I should add a bit of obfuscation to the code before it gets released into the wild. VS2010 comes with the CE edition of dotfuscator so I've run it and it produced an .exe in a 'Dotfuscated' folder. Do I just replace all four 'Primary output from. custom actions with the assembly from the Dotfuscator folder or am I missing something?

View 9 Replies

Protect My Assemblies With Dotfuscator Community Edition?

Nov 12, 2010

I would like to protect my assemblies with Dotfuscator Community Edition I have a setup project that builds an MSI installer. I was wondering if theres any way to include this into my project so that when I build my solution Dotfuscator Community Edition automatically protects the assemblies

View 4 Replies

C# - Protect Exe Through Dotfuscator In Vs2008 By Post Build Option

Aug 23, 2011

I am new to Dotfuscator. I want to protect my .exe file through dotfuscator in visual studio2008 using post build option.But I am unable to do this ok,I am using the command

[Code]...

View 2 Replies

Stream Read Return Length 0 While Stream Is Open And Has Valid Data In It?

May 25, 2012

in an winForm app in VS2010 win 7 compiling to x86, I try to do what Alvas.Audio seems to work. See (c# ex: [URL] for reference.

Dim data() As Byte = wr.ReadData(second * i, second)

The result give me data.length()=0. I do not have any exception, I can read format from it and whatever reader I use I got this problem.EDIT : After some tests, it seems like the uncompressed file I create in the first step (in PCM format, with .wav extension) can not be recognized by the Alvas.audio library for the second step. I must miss something around Audio file markups or something alike.

Here is the code that might be the source (basically this is step 1):

Dim functOut As String = String.Empty
Dim wr As Alvas.Audio.IAudioReader = Nothing
Dim fs As IO.FileStream = Nothing

[code]....

How can I write the resulted stream to be sure I can read it again later?

View 1 Replies

VS 2010 Make Shoutcast Stream Info Like The Stream Name

May 5, 2011

Im making a desktop player for a online web radio, and for the program I wanna make it show all the stream info. Like the stream name, and such. However I dont know how to do this? I looked everywhere

The server url is setup like this "[URL]" And it has all the stream info and that there. So is there a way I can get the info from there onto like say a label? Live updates btw.

View 1 Replies

Finding Resource ID Or Index Of A String/icon Resource?

Mar 4, 2010

I need to refer to some strings using an "indirect string" in the registry. It should be in this form:

@filename,resource

MSDN: "If the resource value is zero or greater, the number becomes the index of the string in the binary file. If the number is negative, it becomes a resource ID."How can I find out either of these numbers for my resources that only have names in VB? I also need the ID/index for the exe's icon.

View 2 Replies

Crypto Stream To Memory Stream?

Nov 22, 2011

I have a problem with the cryptostream, if i write the stream to a memorystream the memory that the stream used is still alocated and i have no way of unalocating it.what am i missingdoing wrong? im using-using on the streams,readers and crypto stuffs so the framework should shut them all down right? i tryed calling .close and .dispose but nothing ,in fact i moved it all over I have provided the sub that im using for the encrytion im in .net 4.5 so there is a lil async stuff but i know thats not the problem coz i moved this code out of my main app(.net 4) for testing to see if i could fix the problem.[code...]

View 12 Replies

VS 2008 Reading A Tcp Stream?

Jul 1, 2009

I'm sending an http request through a proxy using tcp, and then using a streamreader to read the netstream...The streamreader is supposed read each line up to </html> , however it doesn't seem to be waiting for the packet/response to be fully received, as it always returns only the first 5-10 lines of HTML.If I add a breakpoint at the line "Using sr", and pause it there for a few seconds and then continue the execution, it will return the full HTML up to the </html> as it should.This is the part of my code which reads the response.

Dim sendbytes As Byte()
sendbytes = System.Text.Encoding.ASCII.GetBytes(ReqHeaders)
netstream = tcp.GetStream()
netstream.Write(sendbytes, 0, sendbytes.Length)

[code].....

View 3 Replies

VS 2008 - How To Get HTML Document From Stream

Apr 16, 2011

How can I get html document from a stream?

View 3 Replies

VS 2008 - Voice Recording And LAN Stream

Jul 19, 2011

I am trying to make a program that can send voice over LAN. I already have the connection between the computers working, but I can't really seem to find a way to actually record + stream sound.

I've found out that I can use
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
and then
mciSendString("open new Type waveaudio Alias recsound", "", 0, 0)
mciSendString("record recsound", "", 0, 0)
mciSendString("save recsound *PATH*", "", 0, 0)
to save and record sound.

But I haven't really been able to find any documentation on that function, so I haven't been able to find out for myself, how I can send the recorded sound over LAN, instead of saving it on the computer.

View 1 Replies

VS 2008 : Stream Writer Keeps Overwriting?

Nov 30, 2009

I have a dataGridView and tied it to a button that saves every time you click it. and every time you click it, I want to write a line to a txtfile that displays how many records were changed and the date that they were changed. Everything works fine but every time a save has been made it over write the previous entry on the text file. Here is some of the code.

If changes > 0 Then
MessageBox.Show(changes & " changed rows were stored in the database.") ' changes shows how many entries were changed
swDate.WriteLine(changes & " record changes on " & entryDate) 'entryDate is formated as date with value of "Now"
Else

[code]....

I am getting the right results in the text file except it over writes previous entry's so there is only one entry saved in the text file at any given time. I want it to keep building the text file so every time something is streamWrited the previous things in the text file stay there and it add to it. Looking at my problem I cant really justify or implement a For Each..Next or a Do While..Loop. My vb knowledge is limited so go easy on me.

View 5 Replies

VS 2008 Advanced Stream / FTP Download

May 10, 2011

I'm trying to write code to download from an FTP site. I got it to work in some cases - mostly text files, but when the reader reads a value greater than 256 it seems to have difficulty. Right now I'm trying with a ZIP file, and the file downloads, but always says, 'File is Corrupted' when I try to open it.

[Code]...

View 1 Replies

VS 2008 Stream Video From Webcam?

Apr 4, 2009

I am interested in streaming video from a webcam on one PC to another PC. Could this be done without streaming to a server. Could this be achieved by streaming using P2P?

View 4 Replies

VS 2008 Using Combo Box And Stream Reader

Apr 20, 2009

im trying to use a 2 combo boxes each with a list of 7 cities these need to link up with numbers in a stream reader to give a total distance.[code]

View 12 Replies

[2008] Read Strings By Stream?

Feb 10, 2009

I need to read strings by stream! Is this possible? I've been searching for quite a while now, without results.So what i have is an application which gets song lyrics. The lyrics come in a string and i need to separate the string into multiple lines. Just to make that clear, lets say that im getting this text and put it into a string:

Bla bla bla..
Na nana na

And in string format = "Bla bla bla... Na nana na" but what i need to do is separate them into its original, line by line.I created an for each loop which looked for upper chars and when found, create a new line. But that didn't work out so well since the lyrics are written in proper english, using the upper "I" everywhere. So i created a new loop which ignored "I":es if they were followed by a space/blank " ". That didn't work either, it skipped some sentences.

View 8 Replies

VS 2008 Using A PDF From Resource?

Oct 1, 2009

I don't completely understand the embedded resource. Here's what I'm trying to do.I've added a PDF to the application Resources using "Add Resource." It appears to add the resource as a BYTE (I'm assuming some type of binary file). I want to simply display this PDF in a PDF component I've added to the application.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AxAcroPDF1.src = My.Resources.aamaspoker End Sub This is not working because .src is expecting a "string" but the resource PDF is a BYTE. So what obvious thing am I missing here about using PDFs as resources?

View 2 Replies

.net - Database Path For Stream DB Creation 2008 R2?

Nov 25, 2010

I have create a Stored procedure which is creates the Streaming Data Base.This SP needs to have the path on which will put the mdf files (and some other things).Until now i was run this procedure after i first create the above mentioned path.Now i want to run the same procedure without interference in the server.So I give the following path in order the procedure to execut it and understand where i want to give the path guide.

\ServerNameSharedFolderNameSQL

The stored procedure takes the path and tries to go to the folder of 'SQL' in order to do her job.But in this point i receive an error which says:CREATE DATABASE failed. Some file names listed could not be created, Check related errors.

-I'm Cheking the way of puting the path and it is absolutelly right, I mean accepted from the server machine and from the client machine as well.

View 1 Replies

VS 2008 - Extended ASCII Characters In Stream I / O

Jul 19, 2011

I am using StreamWriter and StreamReader in VB.NET 2008 Express to read and write ASCII text files. When I create the file and later read it, there is no problem, because I use System.Text.Encoding.UTF8 on both the write and read sides, so extended text is handled without problem. But sometimes, I have text files come in that are just straight 8 bit ASCII without the Unicode BOM... and they get a lot of junk when I try to read in anything with extended ASCII characters in it. It seems like the 8 bit extended characters are translated into multi-byte codes, and since they are filenames, of course, that doesn't work. Since the filenames just have straight 8 bit ASCII filenames. I have tried all sorts of encodings, and nothing seems to work.

The most common character that causes a problem is an "a" ... it is used in a lot of proper names. The funny thing is that sometimes is seems to workout... is there a way to read these types of text files? Some way to just tell StreamReader not to decode the text, just treat it as straight plain 8 bit ASCII text (with the old IBM PC mapping, I think). The one thing that works is to manually edit the input, replacing the extended characters with their un-accented partner and then renaming the files to match the new spelling. Maybe I should just go to read them as byte input and breaking the lines apart in my code.

View 3 Replies

VS 2008 : Pass The BackgroundWorker1_DoWork A Stream And 3 Textboxes?

Feb 24, 2010

I need to pass to the BackgroundWorker1_DoWork a stream and 3 textboxes.I can pass the 3 textboxes as an array but the stream complicates it:

BackgroundWorker1.RunWorkerAsync() <== from here?

View 1 Replies

VS 2008 Cannot Close Stream Until All Bytes Are Written?

Dec 14, 2010

I am sending a POST request to an API server and I have reused code where I have successfully done this before on other servers and for some reason, which I cannot figure out why, it's not working. I get the error:

Cannot close stream until all bytes are written."}

even though I declared the content length correctly and I am not sure what I am missing here...

data = data + "</posts>"
Dim postBytes As [Byte]() = Encoding.UTF8.GetBytes(data)
Thread.Sleep(10000)

[Code].....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved