Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM+ question 1

Status
Not open for further replies.

catab

Programmer
Mar 19, 2003
5
0
0
RO
Hello! I created an ActiveX Dll with several class modules, and functions/subs. I created a new application in the Component services, I added the dll, and then I exported the application (I created the application proxy).

After installing the proxy on the client PC, I noted that the dll installed on the client computer is (almost) the same size of the dll from the server PC.

Is this normal? I thought that the proxy application must contain only the interface definition, not the implementation. Am I wrong?
 
The type libary is what the remote pc needs. if you are using VB, the type library is embeded in the .dll, therefore the entire dll is copied over. Using C++ you can seperate the type lib from the dll.
 
Hello topher0303! Thanks for your response! So, if I understand well, there is no way to separate the interface from the implementation, when using VB6? I think that exporting the whole dll might be a security issue, because on the client PC there is "business logic" code.

So, if i try to write a dll using, let's say Visual C++, after creating a COM+ application in Component Services and exporting the Application Proxy, on the client PC there will be only the interface (or type library)? How can I create a small COM+ component in Visual C++? I'm sure it's not so easy like VB.....

However, what happens if I want to add some code in a component? I don't change the parameters of the function, I only add some code, compile, and replace the dll on the server. The application will fail next time when the client will run the Application? Do I have to reinstall the application proxy on all client PC's?

Thank you in advance!
Have a nice day!
 
hi
when i register xxxx.dll through dos promptusing(regsvr32 xxxx.dll) it gives an error "loadlibrary("xxxx.dll")failed-The specified module could not be found"

canu help in solving this problem

regards

lorish
 
when already a compiled dll is running on the server, and later on u make changes to that dll(no parameter changes), now when u compile ,prior to that set the compatibility to binary compatibility and make a copy of the dll alreaady compiled(runing on the server) , and select that file and then overwrite the existing file(before this u should shut down the existing dll ) .start the dll again. ur client need not install any application proxy again nor do u have to make an export proxy file again.
 
topher0303:
In VB6 I think if you create your classes using the Implements keyword.... the type library info will be isolated in the DLL so the whole dll will not need to be copied to the client PC.

First you create a "blueprint class" ..say.. baseCLASS in which you define all the methods .. (function NAMES only) .. but no CODE in the methods!!!!

Then you create another class say ..mybaseCLASS (which is the actual class that will be called by client PCs) .. and in the declaration you say...

Implements baseCLASS

Then all the methods in the baseCLASS will automatically be available in this new class .. then now you can add your business logic to these same methods in mybaseCLASS.

I believe in this way... only the type library info will be generated in the application proxy instead of the whole dll being copied to the client PC.

i have a feeling you are more comfortable creating your components in VB than C++.
 
hi catab ..im a newbiew to COM+..i have a question
regarding COM+ Events that has something to do with Interfaces..since u were having a problem with interfaces, i thought i could just post my question here..any idea about this?

Lets say I have a standard COM component (COM.dll) which containts over 10 methods. lets assume one of them is Notify() that returns a string "Hello World".
Now suppose i want to create an object(SUBR.dll) that wants to subscribe to Notify().
How do i achieve that using COM+ Events ?
Should I have an Interface which COM.dll implements and get SUB.dll to implement it ?

please explain it in VB

vickram
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top