Search Results - VBForums

Search:

Type: Posts; User: Ben321

Page 1 of 13 1 2 3 4

Search: Search took 0.04 seconds.

  1. Re: Questions about cleanups of DCs and Bitmaps

    Never mind, I just realized I made a stupid mistake in my code. The post that was here, I would have deleted, but I can't delete my own posts.
  2. Re: Questions about cleanups of DCs and Bitmaps

    Would this work too (since I will never need the original default bitmap that came with the DC when it was created, and I will have no further use for my bitmap, once I'm done using it in my DC)?

    ...
  3. Re: In case you need to convert between pixels and himetrics

    That may be a good approximation for small images (like ones that reasonably fit on your screen), but it isn't the exact value. I found that VB6's approximation does NOT work with very large images...
  4. Replies
    2
    Views
    222

    Re: Questions about DLL calling conventions

    I didn't now that VBforums had an assembly language section. I'll repost this message over there.
  5. Replies
    2
    Views
    222

    Questions about DLL calling conventions

    Ok so using GoAsm assembler and GoLink linker, along with the Easy Code GUI for the GoAsm suite, I wrote my own DLL file, complete with some exported functions, entirely in assembly language. Problem...
  6. Re: Question about CreateFile parameter dwCreationDisposition

    I would have thought that the dwDesiredAccess parameter would have controlled whether reading and/or writing was allowed. Did you make sure that dwDesiredAccess was set to allow both reading and...
  7. Question about CreateFile parameter dwCreationDisposition

    If you use Truncate (the value 5) for this parameter, it opens the file and then removes all the bytes of data in the file when it is opened, but does it allow further access (reading and writing)...
  8. Re: What exactly are the parameters for the API method called DispCallFunc?

    It would help if people remembered to press F5 to refresh their browser window and quickly reread the post they just read, just before replying, to make sure they are replying to the most recent...
  9. Re: What exactly are the parameters for the API method called DispCallFunc?

    Sorry, I misread that. My above reply would not have even been posted if I'd read it correctly. But I edited it to reflect that, and instead posted something else in its place. Sadly, you never...
  10. Re: What exactly are the parameters for the API method called DispCallFunc?

    Ok, I tried it, and it still doesn't fix it. Same error. Could you please try my code, and see what's wrong with it? Maybe compile to an EXE file, and run it through a debugger like OllyDbg, and see...
  11. Re: What exactly are the parameters for the API method called DispCallFunc?

    Getting unexpected error when using it with a test class.

    My form's code is

    Private Declare Function DispCallFunc Lib "oleaut32.dll" (ByVal pvInstance As Long, ByVal oVft As Long, ByVal cc As...
  12. Re: What exactly are the parameters for the API method called DispCallFunc?

    So the value I'm supposed to put in the lpInstance parameter is not the value returned by ObjPtr then? I believe the value returned by ObjPtr is actually a pointer to the pointer that points to the...
  13. Re: What exactly are the parameters for the API method called DispCallFunc?

    Thanks for the info. I finally figured it out, though I didn't see your reply post before I managed to figure it out. I found some other places on the net that had some info (which I wasn't...
  14. Re: Questions about ipicture, ipicturedisp, and stdpicture

    That's strange. I thought which type of object it created depended entirely on which GUID you used (the one for IPicture or the one for IPictureDisp).
  15. What exactly are the parameters for the API method called DispCallFunc?

    Looking at MSDN I see

    HRESULT DispCallFunc(
    void *pvInstance,
    ULONG_PTR oVft,
    CALLCONV cc,
    VARTYPE vtReturn,
    UINT cActuals,
    VARTYPE *prgvt,
    ...
  16. Re: Questions about ipicture, ipicturedisp, and stdpicture

    Thanks, but that still didn't answer the second question and associated sample code (the one involving the OleCreatePictureIndirect). Can you explain why that doesn't cause an error or crash?
  17. Re: Questions about ipicture, ipicturedisp, and stdpicture

    So here's how I understand it. IPicture is an interface that is implemented in the StdPicture class. However only a certain subset of those IPicture methods and properties are made accessible by the...
  18. Questions about ipicture, ipicturedisp, and stdpicture

    I notice that I can use "Dim VARIABLE As" to create a variable of any of these 3 types of picture objects, but when I use "Dim VARIABLE As New" I am only able to create a 1 of the 3 (the StdPicture...
  19. Replies
    4
    Views
    291

    Re: What's wrong with this CRC32 algorithm?

    Finally finished up this project, fixed all the errors, and even added CRC16 functionality. It has been thoroughly checked against other software that calculates these CRCs, and I have found that...
  20. Thread: modCRC.bas

    by Ben321
    Replies
    0
    Views
    153

    modCRC.bas

    This is my code for CRC calculating. It calculates CRC32 using the standard polynomial 0x04C11DB7, and also 2 different 16bit CRCs (one uses the standard CRC16 polynomial 0x8005, and the other uses...
  21. Replies
    4
    Views
    291

    Re: What's wrong with this CRC32 algorithm?

    Ok, so I have now gone and fixed it, so that it will now work for any conditions. For any input that is used, it will always work regardless of which parameters are set to true or false. It now...
  22. Replies
    4
    Views
    291

    Re: What's wrong with this CRC32 algorithm?

    Ok, thanks. I'll have to try that.
  23. Thread: modZlib.bas

    by Ben321
    Replies
    0
    Views
    184

    modZlib.bas

    This is my module file for using zlibwapi.dll in VB6. To use this code, simply copy the text in the code box at the bottom of this post, and paste it into an empty module in VB6. Note that you must...
  24. Replies
    4
    Views
    291

    What's wrong with this CRC32 algorithm?

    It has 4 settings, InvertInitCRC, MirrorInputBits, MirrorOutputBits, and InvertFinalCRC.
    The standard official CRC32 has all of these set to true, so that was what I first tested it with. And it...
  25. Questions about STARTUPINFO structure in VB6

    Since VB6 is a bit quirky with userdefined types, and all the rules it has for handling them internally, while the results withing VB6 might appear fine, when passing a UDT to another process like an...
  26. Question about CreateProcess and closing handles

    So according to https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx I need to close the process and thread handles in the PROCESS_INFORMATION structure, when I'm done...
  27. In case you need to convert between pixels and himetrics

    When using picture1.image.width I noticed an unfortunate thing, the units aren't pixels. Instead they are called himetrics. So I made a really big picture box (pixelwidth = 0x8000) and then did...
  28. Re: What's wrong with my Heap API commands here?

    Fortunately the ApiViewer2004 software can export a text file, which can then be edited in Notepad (or even better yet Notepad++). It can also then import text files, so you can make your own...
  29. Re: What's wrong with my Heap API commands here?

    I finally see where I went wrong. Actually it was where the program ApiViewer2004 went wrong. It had the "lpMem" parameter defined with ByRef rather than with ByVal. The result is that when I was...
  30. What's wrong with my Heap API commands here?

    I read that LocalAlloc and GlobalAlloc are now considered old, and MSDN recommends using Heap functions instead. So I read how to use them and I tried the below. But I'm getting unexpected results,...
  31. Replies
    5
    Views
    364

    Re: DrawLine function with pixel count output

    That only measures physical distance between 2 points, and can result in a number with a fraction (like 10.125 pixels). But what if you want to know how many pixels were actually drawn. In the case...
  32. Replies
    5
    Views
    364

    Re: DrawLine function with pixel count output

    On screens where the background is black, lines would be white, and a double-drawn pixel would be extra-bright. But in Windows, the default background is white, and foreground is black, and there's...
  33. Replies
    5
    Views
    364

    DrawLine function with pixel count output

    This is a function I wrote intended to replace the built-in VB6 Line method. With the internal Line method, in addition to all the intermediate pixels of a line, the first pixel is also drawn. But...
  34. Replies
    0
    Views
    346

    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...
  35. 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...
  36. 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...
  37. 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...
  38. 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...
  39. Replies
    0
    Views
    438

    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...
  40. 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...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width