Results 1 to 5 of 5

Thread: Plz Send Me Src Code for DLL FILE???

  1. #1

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    Could someone please send me the src for a dll file that they have made, and tell me how to access it in my programs??

  2. #2
    Guest
    there are two articles in the activex topic section that explain a simple dll and how to use them... they are towards the end... the articles are about working with objects... they will show you how to creat a dll object... then how to use them...

  3. #3

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    thanks heaps

  4. #4
    Guest
    //all necessary includes
    //standard entry point of any Win dll
    BOOL WINAPI DllMain(HANDLE hModule,DWORD ul_reson_for_call,
    LPVOID lpReserved)
    {
    switch(ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    break;
    case DLL_PROCESS_DETACH:
    break;
    }
    return(TRUE);
    }

    //C++ implementation
    extern "C"
    {
    //your declarations go here
    extern__declspec( dllexport) long YOURFUNCTIONNAME(YOURPARAMETERS);
    }

    long YOURFUNCTIONNAME(YOURPARAMETERS)
    {
    //your code goes here
    return 0;
    }

    then from your vb application do:
    Declare Function YOURFUNCTIONNAME lib "YOURDLLNAME.dll"(YOURPARAMETERS) as long

    and then
    call YOURFUNCTIONNAME(YOURPARAMETERS)

  5. #5

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Thumbs up

    thanks, but i was kind of thinking along the line of vb code and not c, but it doesn't matter, i have made a dll now

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width