Go Back   FlashFXP Forums > >

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

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 09-24-2003, 09:30 PM   #1
vod
Member
FlashFXP Registered User
ioFTPD Registered User
 
Join Date: Jun 2002
Posts: 84
Default My shmem utils

Incase anyone wants to look at it these are the shmem functions ive written (to see how bad of a programer i really am )

btw, theres no comments in the thing...

oh yea, its not even close to thread safe, so dont even think about it!
Attached Files
File Type: zip utils.zip (3.6 KB, 114 views)
vod is offline  
Old 09-25-2003, 12:08 PM   #2
phoenixfr
Senior Member
 
Join Date: Nov 2001
Posts: 149
Default

thx 4 sharing
phoenixfr is offline  
Old 09-26-2003, 11:48 AM   #3
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

It would be even neater, if one had time to wrap these up in a dll with some simple api calls
darkone is offline  
Old 09-26-2003, 01:26 PM   #4
ADDiCT
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Aug 2003
Posts: 517
Default

yeah, i'd love to be able to use shmem in VB

(i was thinking of making a dll myself with my basic c knowledge, but i can't even get the samples compiled)
ADDiCT is offline  
Old 09-28-2003, 02:22 PM   #5
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

little thing u might wanna add to your getOnlineUser() function:

sometimes, the userid in the returned LPDC_ONLINEDATA structure is -1... that happens when the user is login in. you should return false then, or io will crash when u'll try to convert that invalid uid to a username later on...

was crashing ioftpd with that in ioBMonitor.
Mouton is offline  
Old 09-29-2003, 04:44 PM   #6
vod
Member
FlashFXP Registered User
ioFTPD Registered User
 
Join Date: Jun 2002
Posts: 84
Default

Quote:
Originally posted by Mouton
little thing u might wanna add to your getOnlineUser() function:

sometimes, the userid in the returned LPDC_ONLINEDATA structure is -1... that happens when the user is login in. you should return false then, or io will crash when u'll try to convert that invalid uid to a username later on...

was crashing ioftpd with that in ioBMonitor.
weird, seems like it should not send back info with uid = -1, ill add a check for it, tho
i forget how it looks in the version i posted, but the updated one i have calls uidToName which takes unsigned int, then it mods it with 1024*1024-1 which prevents crashing io
of course, -1 will actually give info back if a user with id 4095 exists...which is not what is wanted

even though i really think that is should be impossiable to crash io via shmem...common for bounds checking dark!
vod is offline  
Closed Thread

Tags
btw, comments, shmem, thing, yea

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 08:18 AM.

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