All,
I am a bit confused on this and I know the forum can help.
My objective is to create and ftp client via wininet api.
This client is an ATL COM Automation Object DLL that encapsulates
wininet api in the getfile() function.
I call that DLL in an ATL COM EXE Client via an import directive.
and want to run multiple instances of the ftpclient object.

#import "E:\cmftp\ReleaseMinDependency\cmftp.dll" \
no_namespace

I use this to instanciate the pointer .

CComPtr<Istandardclient> ftpclient;

I then populate the object instance with variable data as:

ftpclient->put_servername(_bstr_t("xxx.xxx.xxx.xxx"));
ftpclient->put_username(_bstr_t("username"));
ftpclient->put_password(_bstr_t("password"));
ftpclient->put_port(21);
ftpclient->put_mode(FALSE);
ftpclient->put_infile(_bstr_t("arts.exe"));
ftpclient->put_indirectory(_bstr_t(""));
ftpclient->put_outdirectory(_bstr_t("C:\\"));
ftpclient->put_outfile(_bstr_t("arts.exe"));

I then execute the objects get function (wininet) as:

ftpclient->getfile();


Well this works great if I run the instances concurrent.
Concurrently it will run all night long transfering files.

My goal is to spawn several concurrent worker threads each with an instance of the ftp object.

I created an Init function that spawns 4 workers in the client app and if I run them without executting the ftpclient->getfile() I successfully create and execute seperate instances of the FTP Object properly.
If I enable the ftpclient->getfile()
(wich is the funtion that initiates and executes wininet functionality.)
I get a critical error and app quits.

Any one have any ideas.

I can post more code when needed.


MGP