Results 1 to 5 of 5

Thread: dll no workie

  1. #1

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919

    Unhappy dll no workie

    VB keeps saying "cannot find entry point", even when there is one!


    heres the code

    Code:
    // fileshredderDLL.cpp : Defines the entry point for the DLL application.
    //
    
    #include "stdafx.h"
    #include "fileshredderDLL.h"
    
    BOOL APIENTRY DllMain( HANDLE hModule, 
                           DWORD  ul_reason_for_call, 
                           LPVOID lpReserved
    					 )
    {
        switch (ul_reason_for_call)
    	{
    		case DLL_PROCESS_ATTACH:
    		case DLL_THREAD_ATTACH:
    		case DLL_THREAD_DETACH:
    		case DLL_PROCESS_DETACH:
    			break;
        }
        return TRUE;
    }
    
    // This is the constructor of a class that has been exported.
    // see fileshredderDLL.h for the class definition
    CFileshredderDLL::CFileshredderDLL()
    { 
    
    }
    int CFileshredderDLL::test(){
    	return 1;
    }
    
    int TEST2(){
    	return 1;
    }
    
    
    // This is an example of an exported variable
    FILESHREDDERDLL_API int nFileshredderDLL=0;
    
    // This is an example of an exported function.
    FILESHREDDERDLL_API int fnFileshredderDLL(void)
    {
    	return 42;
    }
    i try calling test(), TEST2(), and fnFileshredderDLL(void) from VB, and from each of there, it doesnt work

    another ? - do i put all of my functions in the CFileshredderDLL class, or outside of the class?


    thanks alot -
    nabeel
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

  2. #2
    Zaei
    Guest
    All of your functions need to be __stdcall to work in VB.

    Might solve the problem, dunno =).

    Z.

  3. #3

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919
    nope didnt work
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

  4. #4

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919
    i found a guide, and did it that way

    the DLL is only 24kb


    vs. the 100kb+ the other one was givin
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You can't use C++ classes in VB unless you implement them as COM objects, so much is sure.

    And as Zaei said, all functions must be __stdcall.
    Remove the FILESHREDDER_API, it helps you nothing for VB. Write a .def file instead.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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