Search Results - VBForums

Search:

Type: Posts; User: Ben321

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    0
    Views
    229

    Here's some code for calculating hashes.

    It works with MD2, MD4, MD5, SHA1, SHA2-256, SHA2-384, and SHA2-512. Put the below code in a module (BAS file). It does everything that CAPICOM does regarding hashes, but without using any ActiveX...
  2. Re: How long does the screen's device context handle last?

    What about the screen's DC? You know, the one who's hDC you get by calling GetDC(0). How does it behave? It is unique because it refers to the entire visible screen. Does MSDN have any special...
  3. Re: How long does the screen's device context handle last?

    Isn't it possible for more than one program to access an hDC for a device? Each call of hDC from a different program, should return a different value for the hDC, so each program has a different...
  4. Re: How long does the screen's device context handle last?

    I was wondering in the context of a video player. I've got a series of images that I want to display to a the screen directly. I have a loop for playing the series of images, that uses...
  5. How long does the screen's device context handle last?

    Say I use GetDC(0) to get an hDC directly to the screen, how long before that number is no longer valid, and I need to get a new hDC for the screen? Does this happen each time the screen is...
  6. Replies
    0
    Views
    402

    FloodFill code using pure VB code (no API)

    Note it runs slow, but I believe this has more to do with the fact that it uses PSet and Point (rather than getting an array of pixels using GetDibBits and then operating on the array) than it does...
  7. Re: How do I determine what type of drive I've opened?

    https://msdn.microsoft.com/en-us/library/windows/desktop/aa364935%28v=vs.85%29.aspx only works for logical drives (as it requires a drive letter like C:\ as the input, not a physical drive specifier...
  8. How do I determine what type of drive I've opened?

    If I use CreateFile with a drive such "\\.\c:" (a logical drive, starting with the first sector of the first partition of the harddrive), or "\\.\physicaldrive0" (the first harddrive starting with...
  9. Re: How do I put global constants in my ActiveX DLL?

    How do you create a TypeLib with VB6? Can it be done? Does it require something other than VB6 to create one?
    Also, how do you register and unregister a TLB? With AX DLLs and OCX controls, you just...
  10. Re: How do I put global constants in my ActiveX DLL?

    Also would be VERY useful to wrap constants in for APIs. I want to create a wrapper for file operation based APIs like CreateFile, and I want it in an ActiveX DLL file. Of course those APIs require...
  11. Re: How do I put global constants in my ActiveX DLL?

    In a waveform generating program, it's very useful to have Pi available. But calling it as a Property Get millions of times, once for each sample at 48000 samples per second, would be a HUGE waste of...
  12. Re: How do I put global constants in my ActiveX DLL?

    Am I wrong in my assumption that VC++ 2010 Express can create only StdCall DLLs, and cannot create ActiveX DLLs? Is it possible to create ActiveX DLLs with VC++2010? Because I NEED to have a constant...
  13. Re: How do I put global constants in my ActiveX DLL?

    Problem with Enums is they return variants. They don't return longs even. They return variants of type Long. Variants are a waste of memory space and take longer to process than normal data types.
  14. Re: How do I put global constants in my ActiveX DLL?

    Tried that with Constants, and it doesn't work. Only works with enums. Is this a bug in VB6? I think I've downloaded ActiveX DLLs from 3rd parties before that do have working constants, but I don't...
  15. How do I put global constants in my ActiveX DLL?

    I am trying to make an ActiveX DLL with instancing type of GlobalMultiUse, and I want a constant in it to be accessible outside of the class it's defined in, like Functions and Subs already are. Yet...
  16. Replies
    23
    Views
    1,058

    Re: Allocating memory for execution?

    Please stop advertising your software on these forums.
  17. Replies
    23
    Views
    1,058

    Re: Allocating memory for execution?

    It looks like when optimization is set, it adds the 2 numbers together before compiling, and stores the output of that addition in the compiled EXE file, rather than storing the instructions to...
  18. Re: Which is a faster method for appending byte arrays?

    I know you have classes in your VB Rich Client DLL that do JPEG encoding and decoding (same with PNG). However, I have yet to figure out how you did it. Did you use calls to WIA functions? Or did you...
  19. Replies
    23
    Views
    1,058

    Re: Allocating memory for execution?

    It turns out that what I thought optimize for speed did, is almost exactly what happens when NO OPTIMIZATION is done (at least for simple arithmatic like a=1 b=2 c=a+b) by changing the compile...
  20. Replies
    23
    Views
    1,058

    Re: Allocating memory for execution?

    I assumed the optimization option "optimize for speed" meant that it made fewer calls to MSVBVM60.dll (which it usually does for even the simplest of operations like addition), it would simply...
  21. Replies
    23
    Views
    1,058

    Re: Allocating memory for execution?

    To try to figure out just how actual raw binary code is stored in VB6, I decided to try to dump the code of a test function.

    The test function contains the same line of VB code repeated 10 times...
  22. Replies
    23
    Views
    1,058

    Re: Allocating memory for execution?

    That costs money. The point of what I'm trying to do is write something like that myself, so I don't have to spend money on copyprotecting my program.
  23. Replies
    23
    Views
    1,058

    Re: Allocating memory for execution?

    Actually if you look at the Declare statement for CallWindowProc, you will notice that those params to be passed are declared ByVal As Long, and I'm passing a 0 to each one. They are normally...
  24. Replies
    23
    Views
    1,058

    Re: Allocating memory for execution?

    I just tried this, but it crashed the VB6 IDE.


    Private Declare Function CallWindowProc Lib "user32.dll" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal msg As...
  25. Replies
    23
    Views
    1,058

    Re: Allocating memory for execution?

    By VB6 compiled DLL do you mean an ActiveX DLL? Or do you mean there's some hack that lets VB6 compile standard DLLs that can then be used with the Declare statement in another project?

    And can...
  26. Replies
    7
    Views
    421

    Re: Question about CreateProcess

    The one thing I don't know about is if I do use the method of VirtualAllocEx to create a shared memory space in another process, how do I signal to that process that said space has been produced and...
  27. Replies
    23
    Views
    1,058

    Allocating memory for execution?

    How does that work?
    I was looking at https://msdn.microsoft.com/en-us/library/windows/desktop/aa366887%28v=vs.85%29.aspx when I noticed this very interesting sentence.


    Apparantly I can create a...
  28. Replies
    7
    Views
    421

    Re: Question about CreateProcess

    Thanks for the info. That sounds a lot simpler than Bonnie West's suggestion of using file mapping, which last time I tried was a PAIN to get it to work right.
  29. Replies
    7
    Views
    421

    Question about CreateProcess

    When I use CreateProcess to start a program from another program, do I get access to the virtual memory space of the created process? Normally if I use CopyMemory to try to copy from one process to...
  30. Re: How do I read console text without program locking up, using WSHOM?

    Problem is that while with Winsock you know how many bytes are available to read, there is NO WAY TO KNOW how many text characters are available to read in a console using Windows script host object...
  31. How do I read console text without program locking up, using WSHOM?

    Ok so I start like this


    Dim EXE As WshExec
    Dim WSH As New WshShell

    Private Sub Form_Load()
    Set EXE = WSH.Exec("cmd")
    End Sub
  32. Replies
    13
    Views
    15,659

    Re: VB6 - Monoton Audio Lib

    Does this do audio only? OR can it RAW READ ANY DATA BITS on a CD. I would prefer it if there were a way to read anything from a data track or audio track. A dumb "bit reader" so to speak, that would...
  33. Replies
    3
    Views
    336

    Re: How do I use SPTI to access CD-ROM drive?

    Woops! It looks like I must have accidentally clicked the wrong forum link and ended up in the wrong section, before writing my post.
  34. Replies
    3
    Views
    336

    How do I use SPTI to access CD-ROM drive?

    If I want to read raw data off of a CD-ROM disk, I'm going to need to know how to used SPTI commands in VB6. For example, I've heard that even with audio CDs which are designed to only hold audio,...
  35. Re: Which is a faster method for appending byte arrays?

    The problem is finding the most efficient way of handling the HTTP stream that the WinHTTP class gives me in blocks of data as byte arrays who's start and end have NO ALLIGNMENT to the start and end...
  36. Re: Which is a faster method for appending byte arrays?

    The tricky part is splitting the frames. Unlike uncompressed data, MJPEG streams are a series of JPEG pictures. Fortunately each frame starts with with the AVI-frame indicator string "00dc", followed...
  37. Re: Which is a faster method for appending byte arrays?

    But you see, that's the thing. I DO need it in a loop. In fact my project is to take an MJPEG video stream over the internet (a stream of JPEG images, each one starting with the AVI frame-start 00dc,...
  38. Re: Which is a faster method for appending byte arrays?

    Ok I just took your advice, and tested it myself. And WOW, the first one is much faster. It's even much faster than string concatenation like Str1 = Str1 & Str2
  39. Re: Which is a faster method for appending byte arrays?

    I was hoping that this might be a well known thing among other VB enthusiasts, who would be able to give me a quick answer.
  40. Which is a faster method for appending byte arrays?

    Is it faster to Redim Preserve the old byte array, and then CopyMemory the new data into the resized old byte array? Or is it faster to create a completely new byte array who's size is equal to the...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.