Home > database >  Pb call vc writing atl com component failure
Pb call vc writing atl com component failure

Time:09-17

I use vc to write a COM (ATL COM) components, can be normal use regsvr32 registered success,
The use of c # and Delphi can also be a successful call,
But using pb calls when the return value is 2, prompt can not find the class,
My pb version 6.0, under version 9.0 tried, also not line,
But click broswer - "ole," programmable objects can see the class attributes and methods,
I'm calling code
Int result
OLEObject myole
Myole=create OLEObject
Result=myole. Connecttonewobject (" MYTESTCOMLib. Hello! ")
Messagebox (" error ", result)

Refer to your devotedly,

CodePudding user response:

Estimate the class name is not correct

CodePudding user response:

reference 1/f, xiajinxian response:
estimate class name is not correct
class name is correct, the other languages are used

CodePudding user response:

refer to the second floor vistang response:
Quote: refer to 1st floor xiajinxian response:

Estimate the class name is not correct
class name is right, other language is to use the


If the column name correctly, and that is does not support the current environment, or the pb doesn't support the

Suggest you use Delphi to encapsulate a DLL, to call in pb

CodePudding user response:

reference lzp_lrp reply: 3/f
Quote: refer to the second floor vistang response:

Quote: refer to 1st floor xiajinxian response:

Estimate the class name is not correct
class name is right, other language is to use the


If the column name correctly, and that is does not support the current environment, or the pb doesn't support the

Suggest you use Delphi to encapsulate a DLL, use pb to call


Thank you very much for your answer, as is the case, but I'm not very familiar with Delphi,
Intend to change channels xp tomorrow, then use vc6.0 compiler a com to see can be supported, this problem bothering me for several days,

CodePudding user response:

C #, Delphi call machine, pb write machine is the same with you, if not, consider whether the lack of VC related DLL, or in the VC compiler option is set to mt, and compile Vs2012 or more if need to run on Windows XP, it should choose VXX_XP

CodePudding user response:

reference 5 floor my_aa reply:
c #, Delphi call machine, pb write machine is the same with you, if not, consider whether the lack of VC related DLL, or in the VC compiler option is set to mt, and compile Vs2012 or more if need to run on Windows XP, it should choose VXX_XP


Thank you for your reply, I put the code into vc6 to solve the problem for a while, as to why pb not, I do not know,
Because when I test on xp, Delphi and c # can call, but the pb can't, use vc6 can now, and there's no need to
Vc2012 runtime (before packaging I also specially packaged in to check the installation environment),

CodePudding user response:

I also encountered such a problem, transfer of the code to can, under VC6 version compiled with high pb don't know, also don't know why, may be my own capability is less than

CodePudding user response:

I also have similar problems, others do COM, in CS under normal operation, under the WS operation error, do not know how to solve

CodePudding user response:

refer to the eighth floor tonyu response:
I also have a similar problem, others do COM, in CS under normal operation, under the WS operation error, I do not know how to solve

You question which should be a runtime environment is not the same

CodePudding user response:

Look at the VC6 and high version of the character set, VC6 default is ANSI, high version is UNICODE, the reason is caused?
  • Related