Go Back   FlashFXP Forums > >

Programming Need help with C/C++/Delphi? Ask here and make us all laugh.

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 06-14-2003, 10:57 AM   #1
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
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  
 

Tags
allocate, error, getprocaddresshshell32, memory, shared


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:31 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)