Go Back   FlashFXP Forums > > > >

Suggestions Post suggestions for upcoming versions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 06-20-2003, 05:29 AM   #6
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

Since the other DDE thread was closed, I'll bring this oldie back up.

My suggestion is to use shared memory + window messages. It's very robust method and quite easy to implement. In C, I would do
it like this.. I could write a library (DLL) in C for this, but then again.. I think it shouldn't be too difficult to do with Delphi.

Btw. Shared memory is only available with WIN2K/XP/NET.

typedef struct _SERVER
{

CHAR HostName[MAX_HOSTNAME];
DWORD dwPort;
CHAR Login[MAX_USERNAME];
CHAR Password[MAX_PASSWORD];
HANDLE hEvent; // Event to set when socket status changes
DWORD dwStatusStore;

} SERVER, * PSERVER;


case WM_CONNECT:
// Lock shared memory
if (! (lpMemory = SHM_Lock(lParam, wParam))) break;
// Allocate temporary store
pServer = (PSERVER)HeapAlloc(hProcHeap, sizeof(SERVER));
// Check allocation
if (pServer)
{
// Expect memory to contain server info
CopyMemory(pServer, lpMemory, sizeof(PSERVER));
// Connect, and store id of status container
dwStatusStore = Connect(pServer);
// Swap pointer
pServer = (PSERVER)lpMemory;
// Store status
pServer->dwStatusStore = dwStatusStore;
}
// Unlock shared memory
SHM_Unlock(lpMemory);
break;

case WM_STATUS:
// Return connection status
return StatusArray[lParam];
darkone is offline  
 

Tags
automatically, ftp, link, press, start


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind local ports... TfDv Frequently Asked Questions (FAQ) 1 06-13-2002 12:20 PM
Problem downloading flashsfv2.0f.zip Fusion Software 15 10-30-2001 04:56 AM


All times are GMT -5. The time now is 06:40 AM.

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