Results 1 to 2 of 2
  1. #1
    mujaqo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2008
    Posts
    13

    Question Loading and using DLL

    I have VDF (Vacuum Fluorescent Display) connected to port COM 6 on my PC, the VDF came with “VFD_DLL.dll” Library and instructions on how to use it but it’s written in C language, can anyone help in converting the below code to VB?


    //how to load dll
    hDll = LoadLibrary("VFD_DLL.dll");

    //how to release dll
    FreeLibrary(hDll);

    //PortOpen
    long PortOpen(char PortName[]);



    //how to define function pointer type
    typedef long (*PortOpenFunc)();

    //how to get function pointer pointed to function of dll
    PortOpenFunc lpPortOpenFunc;
    lpPortOpenFunc = (PortOpenFunc)GetProcAddress(hDll,"PortOpen");

    //how to call function of dll
    lpPortOpenFunc();

    //DisplayText
    long DisplayText(char str[]);

    //how to define function pointer type
    typedef long (*displayTextFunc)(char str[]);

    //how to get function pointer pointed to function of dll
    displayTextFunc lpdisplayTextFunc;
    lpdisplayTextFunc = (displayTextFunc)GetProcAddress(hDll,"displayText" );

    //how to call function of dll
    char* Temp = (char*)(const char*)str;
    lpdisplayTextFunc(Temp);


    -------------------------------------------

  2. #2
    vincent-leeway is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    36
    Well you can connect to your dll written in C using VB by using the following steps, http://support.microsoft.com/kb/106553

Please reply to this thread with any new information or opinions.

Similar Threads

  1. loading empty form
    By Suzie2012 in forum Forms
    Replies: 5
    Last Post: 10-10-2012, 07:03 PM
  2. Possible If statement for loading of a form
    By computer_man20037 in forum Programming
    Replies: 2
    Last Post: 05-16-2012, 09:53 AM
  3. Need help loading values
    By ismith in forum Forms
    Replies: 3
    Last Post: 01-03-2012, 01:20 PM
  4. frm not loading when DB opens
    By Gavroche in forum Access
    Replies: 3
    Last Post: 09-13-2011, 08:56 AM
  5. Auto Loading a Form
    By toddbuckles in forum Programming
    Replies: 7
    Last Post: 12-28-2010, 04:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums