Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting up COM on remote machine
Message
From
22/11/2002 04:54:18
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00724195
Message ID:
00725662
Views:
25
Thanks for that Nick.

I did actually notice those unused parameters, between mailing you the class and receiving this message, and removed them, this was because it was a VFP app class that I'm rewriting into COM.

Cheers
Kev

>You need to add the description for the class, then COM EXE does not bomb with that "Invalid read from the .VBR file..." message when you run Clireg32. Either right click on the class in Project Manager and edit description, or go to Class Info and edit the description there.
>
>I also noticed that you have parameters in COM class INIT() event (they are not used however). Note that you cannot pass the parameters to COM object on INIT(). That's the way COM is designed. The parameters will be just ignored. You will need to pass the necessary parameters to some method after the COM is instantiated.
>
>You may also set vsibility of all unnecessary methods and properties of your class to Hidden or Protected, that will lighten your COM interface.
>
>Aso, remember that COM EXE starts on the server PC in the directory where VFP runtime is, so if you want to use the data on theserver, you will have to set path to your directory where DBFs are located or use full path filename.
>
>>Nick
>>
>>What I've noticed is that if I create a DLL or EXE using a visual class library, it misses out text from the VBR, but if I just use a PRG on it's own, it includes all the details.
>>
>>I've e-mailed you my project.
>>
>>Thanks
>>Kev
>>
>>>Yes, you can. Don't forget that the class has to be marked as OLE Public in Class Info.
>>>Note also, that COM EXE project supposed to have a .PRG (event empty one, which must be Set Main in a project.)
>>>
>>>>Before I do that, can you create COM objects using visual class libraries, or does the whole thing have to be in a prg?
>>>>
>>>>Thanks
>>>>Kev
>>>>
>>>>>Try to edit VBR file and make this line like:
>>>>>HKEY_CLASSES_ROOT\MyCom.Main = Main
>>>>>
>>>>>Seems that VBR file ws not generated correctly, so there is a problem with your COM project which needs to be fixed before you will be able to do it properly
>>>>>
>>>>>Could you send me your COM EXE project so I could check what is going on?
>>>>>Also, Win 98 is not a good place to run the COM EXE server under. There is an article how to do it, but I was not able to get it working (I know some people did, however I didn't try hard and moved under Windows 2000)
>>>>>
>>>>>>OK, I've registered the EXE on another PC (w98) and tried CliReg from my PC, and I get exactly the same message.
>>>>>>
>>>>>>Any ideas?
>>>>>>
>>>>>>Thanks
>>>>>>Kev
>>>>>>
>>>>>>>Are you trying to do setup for the client and the server on the same PC? If so, that would not work.
>>>>>>>
>>>>>>>>Nick
>>>>>>>>
>>>>>>>>I get an error when trying a CliReg32, please note though, I am testing this using my WinXP machine only, so that could be the issue.
>>>>>>>>
>>>>>>>>The error is Invalid read from the .VBR file. "HKEY_CLASSES_ROOT\MyCom.Main = "
>>>>>>>>
>>>>>>>>Any ideas?
>>>>>>>>Thanks
>>>>>>>>Kev
>>>>>>>>
Previous
Reply
Map
View

Click here to load this message in the networking platform