Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Prog using OLE, Socket, Service And Thread, Need Help

HackmanCHackmanC Member Posts: 441
******* WHAT I WANT: ******
I want this to be called by a ASP, a VB DLL call the function MySendMessage, it use a VC global variable to my class socket to send a broadcast to all the computers in the intranet with a (my client software) made with Delphi.
// I BROADCAST THE NUMBER OF USERS OF MY APPLICATION TO IT OFFICES
// AND THE NUMBER OF TIMES THEY CONSUME SOMETHING.
***************************
ALL THIS WORKS BUT...
***************************
When I call in the ASP the DLL it locks IIS until it has done my page. So if I call my DLL the, it does not continue with multithread. I believe is single thread. WHO COULD BE WRONG?. I believe its concerned about CoInitializeEx, CoComModule?
***************************
DESCRIPTION:

I used VC6, c++. Wizard in ATL *Services*.
It give me this:

[code]
inline _service
inline _servicemain
... etc

int PASCAL WINAPI _tWinMain ()
[/code]

I made a C++ Class for Abstract Socket where I send a broadcast, its does only a init, done and send. (It give me the file and the class)

I made a ATL Class for Abstract OLE -Pipe- I named it. I want it called from a ASP page. It only has MySendMessage. (It give me the file and the class)

I did not make code to Handle Threads. So I expected it give me a lot of bugs. And I keeped KISS, (Keep it simple and stupid).

I compiled /MT (Multitread) without MFC.

I made a Visual Basic DLL for VTable Binding, I did not mess with late binding. And compile it multithread apartment model.

THANKS IN ADVANCE.

***************************
SOURCE CODE
***************************
MAKE A ATL Wizard with service **Change the CoInitialize to CoInitializeEx(-Multitread-)**, add a Class and a ATL Class BASIC, add a member function call MySendMessage and do a loop inside with a counter from -int- 1 to 32767. Preferably with a SleepEx if your machine is too fast. Made a VB DLL with default and a VB Class that calls MySendMessage from the VTable of C. and MULTITHREAD Apartment with no MTS. Call If from an ASP.
***************************

Sign In or Register to comment.