Search results for query: *

  1. V

    Copying .exe file from Project

    just debug thro the code and check whether bytesRead = resourceStream.Read(buffer, 0, bufferSize) While (bytesRead > 0) files.Write(buffer, 0, bytesRead) is working, (mean reading bytes)
  2. V

    Copying .exe file from Project

    Didn't u try some other file path and you have to give the full path like C:\Documents and Settings\Owner\My Documents\Files\Proggy.dat or C:\Documents and Settings\Owner\My Documents\Files\Proggy.exe or something.
  3. V

    Copying .exe file from Project

    Also if I get some time I will upload a working code.
  4. V

    Copying .exe file from Project

    well,, u have to give string arguments, for ex ur assembly name is Program2 and resource name is proggy then it should be like GetManifestResourceStream("Program2.proggy") Also there is another overloaded method of GetManifestResourceStream where u can just past only the resource name.. try it too
  5. V

    Help needed with reading binary files

    If you want to preserve the array and expand then Redim Preserve buffer(newSize) OR else use ArrayList object Why do u say u don't know the no of bytes, it should be the file size in bytes
  6. V

    Help needed with reading binary files

    First define the array as Dim buffer() as Bytes then Redim buffer(size) or else Dim buffer() As Byte buffer = New Byte(size) {} BTW, can't you guys just search the web or MSDN for this kind of simple things, instead of always posting and waiting someone else to come and answer. These are...
  7. V

    Generating Threads at Runtime.

    Quick reply is Check MSDN for Thread.GetData and Thread.SetData where you can save and retrieve thread specific object (so u can save anything u want)
  8. V

    Copying .exe file from Project

    missed it rest is While (bytesRead >0) fileStream.Write(buffer,0,bytesRead) bytesRead = resourceStream.Read(buffer,0,bufferSize) End While resourceStream.Close() fileStream.Close()
  9. V

    Copying .exe file from Project

    Try this, Once u add the exe to ur solution change the property 'Build Action' to 'Embedded Resource' And in the code u can extract the resource as follows Dim resourceStream As System.IO.Stream resourceStream =...
  10. V

    Help needed with reading binary files

    Why don't u can't guess the type of the endOFStream ...///=)) Didn't u notice the statment endOFStream = True
  11. V

    How To Limit Only Subscribed Users To Web Methods In Web Service?

    Havn't gone through on this much, but I think this is where SOAP Header of the Envelope can be used
  12. V

    Copying .exe file from Project

    First thing u have to check is do u have a folder called C:\Program1 or is this the file name u want to copied as... Do u want to keep ur exe (running as embedded resource and then extract it and copy)
  13. V

    Help needed with reading binary files

    Yes Put a while (True) loop and keep on going calling ReadByte (make sure to loop in a try catch block and handle the exception of EndOfStreamException i.e. when stream is over While (Not endOFStream) 'num = r.ReadUInt16 Try num = r.ReadByte() Catch ex As EndOfStreamException endOFStream =...
  14. V

    How to choose function implementation at runtime?

    I think u will benefit from the concept of Delegates (function pointers) read about .NET delegates
  15. V

    newbie help

    Well u can have following to generate Random index for ur card array Dim i As Integer i = (New Random).Next(1, 52) '// Card between 1 and 52 and when you draw a card set a flag to Card object that it is already drawn so that u can validate it against teh flag
  16. V

    Help needed with reading binary files

    Well to my understanding.... when reading and saving binary mode we used to use access by Bytes,... so will following change would satisfy ur requirement Dim fs As FileStream = New FileStream("C:\Arch.bin", FileMode.OpenOrCreate) Dim ctr As Int32 Dim num As Byte 'UInt16 Dim n As String Dim r...
  17. V

    Generating Threads at Runtime.

    Well to generate number of threads what u have to do is call the CreateNewThread function in a outside loop with all given data u need and also apart from the thread name u can store data (thread specific TLB) using t.SetData() and you can retrived the data stored in the thread using...
  18. V

    Help needed with reading binary files

    Okay now where/what the issue... only thing I can see is u're reading the num (integer) and convert it to Hex and put it in n (string) and u write the num (integer) to the text file. Is this where u went wrong
  19. V

    show progressbar

    It is not clear what you exactly want, what u want is to display progress bar filling up during the file save operation. If it is so,, to my knowledge you don't have any clue of how many seconds OS takes to save the file.. so you have to just animate the progressbar and finally complete the...
Back
Top