-
Hi,
I recently purchased a piece of third party software (Symantec pcAnywhere) specifically because I needed a piece of remote access software which I could automate.
Although the automation is unsupported by Symantec they do proved an online manual. I quote: "Visual Basic Examples Should Run As Is". I cut and pasted the following code into my app:
Dim objRemoteDataManager As Object
Dim objRemoteData As Object
Dim strDirectory As String
objRemoteDataManager = CreateObject(Winawsvr.REMOTEDATAMANAGER)
strDirectory = objRemoteDataManager.CurrentDirectory
MsgBox strDirectory
When I run the app I get the error "Variable Not Defined" on Winawsvr.
I contacted Symantec for some informal advice, they refuse to help in any way shape or form.
I've only ever used automation with Access before.
I've looked in my references and there is no pcAnywhere 9.2 object library to reference.
Symantec's documentation says that information regarding the automation server (Winawsvr.exe) is stored in the registry and that the code should run as is.
This example code was probably written using VB6, I only have VB5. Do I have to add something to my code to make VB recognize the automation objects?
Any suggestions would be greatly appreciated.
Best regards,
Rob Brown.
-
Hi Rob,
CreateObject will work fine with VB5. The function expects a class parameter of the format "appname.objecttype". Since it is expecting a string, you cannot omit the double quotes.
My advice is:
a) put double quotes around winawsvr.REMOTEDATAMANAGER
b) moan like buggery to Symantec
c) don't ever buy Symantec products, they treat their customers like **** - been there.
Hope it works,
Paul.
-
OK, I've tried this and it seems to have moved things on a bit. I'm now getting an object or with block variable not set error on the same line.
Any more suggestions?
-
You need to use "Set", i.e.
Code:
Set objRemoteDataManager = CreateObject(Winawsvr.REMOTEDATAMANAGER)
Whoever wrote that manual was crap, and didn't test his code. Wonder if it was me.:D
Cheers,
Paul