User Profile

Collapse

Profile Sidebar

Collapse
MarDude
MarDude
Last Activity: Feb 1 '11, 07:03 PM
Joined: Feb 18 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • That link brings of a list of "How to write text to a file".

    Sorry, but completely useless to me. I already know how to do that and have in fact been doing it for a number of years.

    I need to get a graphic to a file (bitmap or TIFF or whatever; I can always convert it) from a handle to a DIB.

    I'd even settle for getting a DIB into a picturebox, that would suit me just fine!
    See more | Go to post

    Leave a comment:


  • How to save a graphic from a DIB handle

    Hello,

    I'm developing a scanning application in VB.NET 2005 using TWAIN. The scanner returns to me a handle to a DIB. I need to save this to a file, but I've been searching everywhere and can't find any information.

    Can anyone point me in the right direction? Thanks.
    See more | Go to post

  • I found out that a pointer to a structure is not the same as a pointer to the memory that the structure occupies. Changed my code to copy the members explicitly.
    Code:
            Dim rc As twRC
            Dim pOneValue As IntPtr
            Dim pPosition As Int32 = 0
            Dim strValue As String
            Dim twFix32 As twsFix32
            Dim twOneValue As TW_ONEVALUE
    
    
            rc = DS_Capability(mtwApp,
    ...
    See more | Go to post

    Leave a comment:


  • MarDude
    replied to How do I inspect data?
    Excellent!! Thank you that is exactly what I needed!!

    Just wanted to note you do need 4 bytes if you are storing 8 as a 32 bit integer. And yes that is a waste (waste of memory, but saving of CPU cycles), but if a structure has the member defined as an integer or a function that you did not write returns an integer you have no control over it. Then there's the issue of -8, which I just found out is stored as (248, 255, 255, 255)...
    See more | Go to post

    Leave a comment:


  • MarDude
    started a topic How do I inspect data?

    How do I inspect data?

    Hello, I am having a problem marshaling data between managed and unmanaged code. So I need to inspect the data at the byte level. What I need to do is store a number, say 8 into a 4-byte integer then copy it to an array bytArray(4) and compare those bytes with other data. I also need to set up the same array and copy it to an integer variable.

    Can this be done? And if so does anyone know how?
    See more | Go to post

  • Thanks for the reply. For the record I searched through quite a few pages on this site which took a couple of hours and found NOTHING helpful. Perhaps no one used the same keywords I used, although it did pick up several quotes that contained the keywords which the article had no relation.
    And that link you provided doesn't provide anything useful, besides it discusses C#, NOT VB. since the problem I am having involves passing data...
    See more | Go to post

    Leave a comment:


  • Marshaling data between managed VB.NET and an unmanaged C Dll

    Hello,
    I am trying to get some data from a C Dll via a structure and I am getting incorrect values back. I tried a couple of examples I found but they do not work. Since I do not know the proper way. I do not know how to fix it. Can anyone give me any advice, hints, redirection or any assistance what-so-ever. I've been struggling with this for weeks now so I will appreciate any kind of guidance (so will my boss :).
    See more | Go to post
No activity results to display
Show More
Working...