BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SWbemLocator.ConnectServer

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Fred Schetterer
Guest





PostPosted: Sun Apr 17, 2005 4:37 pm    Post subject: SWbemLocator.ConnectServer Reply with quote



OK, I am stumped.

This VB code works:
objLocator = CreateObject("WbemScripting.SWbemLocator")
objWMI = objLocator.ConnectServer("VM2kW", "rootcimv2",
"Administrator", "****")

Same code in Delphi:

objLocator := CreateOleObject('WbemScripting.SWbemLocator');
objService := objLocator.ConnectServer("VM2kW", "rootcimv2",
"Administrator", "****")



Fails to logon. Now keep in mind if no credentials are supplied all works
identically. The Delphi version only fails if credentials are supplied with
an "Access Denied" error.

Any help appreciated.

Fred




Back to top
Fred Schetterer
Guest





PostPosted: Sun Apr 17, 2005 5:55 pm    Post subject: Re: SWbemLocator.ConnectServer Reply with quote



If anyone is interested, the solution is to use all Widestrings.


"Fred Schetterer" <x (AT) hotmail (DOT) com> wrote


Quote:

Fails to logon. Now keep in mind if no credentials are supplied all works
identically. The Delphi version only fails if credentials are supplied
with an "Access Denied" error.




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.