Home Page link  

RMS - 'Could not create object' in Custom Extension

 

Point-Of-Sale Software - - MS Point Of Sale software discussed here

 Post an article  get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
RMS - 'Could not create object' in Custom Extension John Dinning 09-03-2008
Posted by John Dinning on September 3, 2008, 10:37 pm
Please log in for more thread options


I am trying to write a custom extension for RMS using a COM object in a DLL.
The DLL is written using Delphi, as that is what I know best, although I
have limited experience of COM.
As specified there is a function called Process that returns a boolean
result.

I have written a COM client in Delphi and it can call the DLL and runs the
function ok.

The function in the DLL is to be called from a Custom button on the POS.
When I try to run the function from the Custom button it finds the DLL ok as
it shows the 'before' and 'after' create messages in my code (see below) but
the Store Operations POS fails to create the object or call the Process
function.

Store Operations POS always returns the error:
"Attempt to execute COM object 'displaysomething.DisplaySomething' failed.
Could not create object."

Is there anyway of finding why it failed to create the object as this
message is not very helpful.

Any other suggestions as to what my problem might be would be very welcome.

Regards,
John.


Code snippets from my DLL :

function TDisplaySomething.Process(MySession: SessionClass): boolean;
begin
ShowMessage('Process Called!!!');
Process := True;
end;



initialization
ShowMessage('Before create');

TComObjectFactory.Create(ComServer, TDisplaySomething,
Class_DisplaySomething, 'DisplaySomething', 'Display Com Object',
ciMultiInstance, tmApartment);

ShowMessage('After create');
end.






Posted by John Dinning on September 4, 2008, 11:46 pm
Please log in for more thread options


Problem solved..

I was using a Delphi 'COM Object' which has an iUnknown interface, when I
should have been using the Delphi 'Automation Object' which has an iDispatch
interface.
I was told in this newsgroup ealier that iDispatch was required (thanks) but
it took me a while to figure out how.
Anyway, I now have the basis for a custom extension in a Delphi DLL.

John.

>I am trying to write a custom extension for RMS using a COM object in a
>DLL.
> The DLL is written using Delphi, as that is what I know best, although I
> have limited experience of COM.
> As specified there is a function called Process that returns a boolean
> result.
>
> I have written a COM client in Delphi and it can call the DLL and runs the
> function ok.
>
> The function in the DLL is to be called from a Custom button on the POS.
> When I try to run the function from the Custom button it finds the DLL ok
> as it shows the 'before' and 'after' create messages in my code (see
> below) but the Store Operations POS fails to create the object or call the
> Process function.
>
> Store Operations POS always returns the error:
> "Attempt to execute COM object 'displaysomething.DisplaySomething' failed.
> Could not create object."
>
> Is there anyway of finding why it failed to create the object as this
> message is not very helpful.
>
> Any other suggestions as to what my problem might be would be very
> welcome.
>
> Regards,
> John.
>
>
> Code snippets from my DLL :
>
> function TDisplaySomething.Process(MySession: SessionClass): boolean;
> begin
> ShowMessage('Process Called!!!');
> Process := True;
> end;
>
>

>
> initialization
> ShowMessage('Before create');
>
> TComObjectFactory.Create(ComServer, TDisplaySomething,
> Class_DisplaySomething, 'DisplaySomething', 'Display Com Object',
> ciMultiInstance, tmApartment);
>
> ShowMessage('After create');
> end.
>
>
>
>
>



Similar ThreadsPosted
Need help on: "Attempt to execute COM object 'MyTest.MyTest' failed. Could not create object." July 12, 2005, 4:26 am
DLL Created using vb.net 2.0... Could not create object. July 20, 2006, 10:31 am
C# addin cannot create object January 9, 2007, 7:58 am
Active X Component Can't Create Object December 9, 2006, 6:58 pm
ActiveX component can't create object February 26, 2007, 10:35 am
"Runtime Error 429: ActiveX can not create object" March 27, 2007, 7:03 pm
Runtime error 429 Active X component can't create object June 6, 2007, 1:49 am
Create Custom Buttons with SQL March 26, 2008, 5:04 pm
Create a Custom POS Button for Tender October 21, 2005, 4:23 am
create a custom POS button to act as the Check Store functionality March 17, 2006, 2:01 pm

Contact Us | Privacy Policy
This site is not affiliated with Intuit - makers of Quickbooks and Quicken software
This site is not affiliated with Sage Software - makers of Peachtree accounting software
XML SitemapXML Sitemap