PBDR.COM

About   -   Contact   -   Purchase   -   Search   -   What's New

 
 
16bit DLL Calling Convention
I quite often get asked what is the correct C code for DLL's to be accessed by PowerBuilder. This is a piece of sample code with the algorthium removed that I use for Password Encryption.
//-------------------
// LibMain
//-------------------
int __export CALLBACK LibMain(HANDLE hModule, 
   WORD wDataSeg, WORD cbHeapSize,
   LPSTR lpszCmdLine)
{
     
    return 1;
}
     
//-------------------
// WEP
//-------------------
int __export CALLBACK _WEP (int bSystemExit)
{
     
    return 1;
}
     
void __export FAR PASCAL Encrypt ( LPSTR Password ) 
{
}
     
void __export FAR PASCAL Decrypt ( LPSTR Password ) 
{
}
 

Top of Page

Legal Notice

Ken Howe 2011