View Single Post
Old 06-14-2003, 10:57 AM  
Mouton
Posse Member
 
Join Date: Dec 2002
Posts: 1,956
Default shared memory not working ?

on ioftpd 4.9.4r
to use shared memory, in the initialisation, i do:

Code:
hShell32	= LoadLibrary("shell32.dll");
if ( Target && hShell32 )
{
  Allocate	= GetProcAddress(hShell32, "SHAllocShared");
  Free	= GetProcAddress(hShell32, "SHFreeShared");
  Unlock	= GetProcAddress(hShell32, "SHUnlockShared");
  Lock	= GetProcAddress(hShell32, "SHLockShared");

  if ( Allocate && Free && Lock && Unlock && hTarget )
  { ... }
  else {
  LPVOID lpMsgBuf;
    FormatMessage( 
    FORMAT_MESSAGE_ALLOCATE_BUFFER | 
    FORMAT_MESSAGE_FROM_SYSTEM | 
    FORMAT_MESSAGE_IGNORE_INSERTS,
    NULL,
    GetLastError(),
    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
    (LPTSTR) &lpMsgBuf,
    0,
    NULL );
  printf("Error on Allocate. Error: %lX - %s\n",GetLastError(),lpMsgBuf); fflush(stdout);
  }
}
this works ok on some pc, but on others:

Error on Allocate. Error: 7F - Kan opgegeven procedure niet vinden.

(means "Can't find the procedure that you filled in.")

Wasn't shared memory supposed to work on all WinNT kernel based OS now ..?
I get this on Win2k and some else reported this happening on WinXP SP1 too :\
While on another SP1, it works ok...
Mouton is offline