Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Tiberius
Newbie


Joined: 03 Nov 2002
Posts: 4
Location: Australia

PostPosted: Sun Nov 03, 2002 3:01 am   

BCB Plugin for ZMud
 
I have been thinking about creating some sophisticated scripts in Zmud. Although the Zmud interpretive language is quite powerful, I feel more comfortable working in BCB. Therefore I have started looking into writing BCB plugins for Zmud. Although I have had no experience in writing COM routines I have found the discussion by Zugg most helpful, as the Borland Delphi and BCB environments are very similar.

I have had some problems showing the registration details of my Test Plugin:


STDMETHODIMP TTestPlugImpl::Register(BSTR* Name, BSTR* Company,
BSTR* Regcode, BSTR* Description, BSTR* Version, BSTR* HelpFile,
TOLEBOOL* LoadDef)
{
AnsiString NameStr = "Test Plugin";
NameStr.WideChar( *Name, NameStr.WideCharBufSize() );

AnsiString CompanyStr = "Personal Use Only";
CompanyStr.WideChar( *Company, CompanyStr.WideCharBufSize() );

AnsiString RegCodeStr = "Personal Use Only";
RegCodeStr.WideChar( *Regcode, RegCodeStr.WideCharBufSize() );

AnsiString DescStr = "A Test of ZMud Plugins";
DescStr.WideChar( *Description, DescStr.WideCharBufSize() );

*LoadDef = true;
}

Any ideas why Zmud won’t recognize the details I have created?
Reply with quote
Tiberius
Newbie


Joined: 03 Nov 2002
Posts: 4
Location: Australia

PostPosted: Sun Nov 03, 2002 8:14 am   
 
Solved my problem. The following code should get other BCB plugin writers out of trouble.



// name
AnsiString NameStr = "Test Plugin";
*Name = new wchar_t[ NameStr.WideCharBufSize() ];
NameStr.WideChar( *Name, NameStr.WideCharBufSize() );

Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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

© 2009 Zugg Software. Hosted by Wolfpaw.net