|
-
Nov 16th, 2000, 06:33 AM
#1
Thread Starter
Lively Member
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.
-
Nov 16th, 2000, 06:43 AM
#2
Fanatic Member
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.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 16th, 2000, 07:28 AM
#3
Thread Starter
Lively Member
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?
-
Nov 16th, 2000, 07:40 AM
#4
Fanatic Member
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.
Cheers,
Paul
Not nearly so tired now...
Haven't been around much so be gentle...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|