Home Home

Download

Download is just like the RemoteMethod method, but it takes a filename as a parameter to download a file to the local directory.
unsigned int Download(
   unsigned int methodID,
   int interfaceVersion,
   short methodOpt,
   short language,
   pCallbackRoutine callback,
   void* objectID,
   const char *fileName,
   const void* BSTR = NULL
);

Parameters

methodID The entity ID for the user.
interfaceVersion For the expect returning parameter schema.
methodOpt CTexasAPI::Mode
language Used for error messages from this method.
callback Used for the results.
objectID Returned to the callback routine.
fileName This returning file should be saved to this location.
BSTR Any parameters for this method.

Return Values

If the method succeeds, the return value is zero else see error codes for more details.

Remarks

Example Use

if(server.Download(ENTITY_FILE,1,CALLBACK_PROGRESS,0,fileCallback,this,"fileName"))
   MessageBox("Unable to download file");

Also See

Upload, RemoteMethod, InvalidateObject

Copyright © 2007, Ekky Software Pty Ltd.