EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SetUserData method

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#11509
Posted: 10/29/2009 12:50:46
by John Hyde (Standard support level)
Joined: 10/11/2009
Posts: 9

The FileDisk example uses a SetUserData method and it is passing a HANDLE or a Pointer to a HANDLE. This is not covered in the documentation. Could you clarify this please.

I am creating a simpler version (single, fixed-size disk but can be instantiated several times) from the comprehensive FileDisk example and want to replace the complexity of the CallbackSupportStruct with the HANDLE it is enclosing.

Many thanks, John
#11510
Posted: 10/29/2009 13:00:51
by Eugene Mayevski (EldoS Corp.)

UserData, as it's name suggests, is a placeholder for application-defined data. You can store something there, and this something will be passed back as UserData parameter of the callback (where applicable). The placeholder can hold a pointer or any other value, equal or less in size than the size of the pointer. CallbackDisk doesn't care, what exactly you put their, neither what type of data you store there.


Sincerely yours
Eugene Mayevski
#11512
Posted: 10/29/2009 13:30:01
by John Hyde (Standard support level)
Joined: 10/11/2009
Posts: 9

OK, since CallbackDisk doesn't require the data then I won't supply it! My application will keep the file HANDLE as a global variable. This adds simplicity, which I like.

Tnx, John

Reply

Statistics

Topic viewed 3463 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!