Thread: help with image dll interfacing vb

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    4

    help with image dll interfacing vb

    Hi all.

    I want to know how to pass a bitmap from vb into a vc++ dll, so that I can do some transformations on it, and then have the dll pass the new bitmap back to vb.

  2. #2
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    Probably better to ask this question in a VB forum too.
    Extreme Visual Basic
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    4
    Thanks for the reply, but I just came from a vb forum and they suggested I try here.

  4. #4
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    arf arf no-one wants to solve your problems!

    I can't really help you with this, because I've forgotten what VB I ever knew. Sorry.
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  5. #5
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Pass the hDC to the VC++ DLL, and then you can manipulate it using the GDI functions.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  6. #6
    Registered User
    Join Date
    Oct 2003
    Posts
    4
    excuss my lacking knowledge, but what is hdc

  7. #7
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    HDC is a handle to a device context. A device context contains information about how things will be drawn to the screen. I suggest you google "device context" and go to the MSDN reference.

    Basically, you'll use a WinAPI function to load your DLL. You'll then obtain the HDC for the bitmap, and pass it to the DLL.
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  8. #8
    Registered User
    Join Date
    Oct 2003
    Posts
    4
    Thanks. I do that search and get back to you.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem reading tiff image files?
    By compz in forum C++ Programming
    Replies: 9
    Last Post: 10-30-2009, 04:17 AM
  2. Passing an Array of Strings from VB to a C DLL
    By mr_nice! in forum Windows Programming
    Replies: 9
    Last Post: 03-08-2005, 06:16 AM
  3. Calling a VB DLL w/ forms from C++ DLL
    By UW_COOP in forum C++ Programming
    Replies: 8
    Last Post: 06-30-2003, 08:04 AM
  4. Accessing varibles in a DLL from VB in run-time.
    By Dirty Sanchez in forum Windows Programming
    Replies: 1
    Last Post: 04-27-2003, 11:25 AM
  5. Passing parameters from VB to C++ through ActiveX DLL
    By torbjorn in forum Windows Programming
    Replies: 0
    Last Post: 12-10-2002, 03:13 AM