Home Page link  

Difficulty in creating .Net dll

 

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
Difficulty in creating .Net dll Vicky 03-21-2006
Posted by Vicky on March 21, 2006, 10:01 am
Please log in for more thread options
I am using C# .Net to customize the RMS. As RMS is in VB, the customization
guide is not so usefull for me. How should I create my .Net dll ?? I have
added QSResult reference to my project, but as QSResult does not have a
strong name I am not able to create a strong name for my project dll also..

Can any help me out and tell me the steps to create, deploy and invoke .Net
dll in RMS...

Waiting for reply... :-(

Vicky... :-)

Posted by Glenn Adams [MVP - Retail Mgmt on March 21, 2006, 5:30 pm
Please log in for more thread options
The only way I was ever able to get a C# add-in to work was to create a
vb.net add-in to catch the COM call from the RMS hook then invoke my c#
add-in from there. Your problem is really with COM Interop, not
specifically with RMS - there is some information on MSDN that should
help you get past the strong naming issue, but there are going to be
more roadblocks after that. vb.net is much easier to deal with...

Glenn Adams
Tiber Creek Consulting
http://www.tibercreek.com
glenn@tibercreek.com
----------------------------------------------
Please DO NOT respond to me directly but post all responses here in the
newsgroup so that all can share the information.


Vicky wrote:
> I am using C# .Net to customize the RMS. As RMS is in VB, the customization
> guide is not so usefull for me. How should I create my .Net dll ?? I have
> added QSResult reference to my project, but as QSResult does not have a
> strong name I am not able to create a strong name for my project dll also..
>
> Can any help me out and tell me the steps to create, deploy and invoke .Net
> dll in RMS...
>
> Waiting for reply... :-(
>
> Vicky... :-)

Posted by Vicky on March 22, 2006, 11:37 am
Please log in for more thread options

Hi Glenn

Do u mean that if I use VB.Net instead of C#.. I will be able to catch the
COM call from RMS..??
I am just starting the customization so will it help me if I start doing
that in VB.Net ??

Waiting for ur kind reply...

Thanks a lot

Vicky....:-)

"Glenn Adams [MVP - Retail Mgmt]" wrote:

> The only way I was ever able to get a C# add-in to work was to create a
> vb.net add-in to catch the COM call from the RMS hook then invoke my c#
> add-in from there. Your problem is really with COM Interop, not
> specifically with RMS - there is some information on MSDN that should
> help you get past the strong naming issue, but there are going to be
> more roadblocks after that. vb.net is much easier to deal with...
>
> Glenn Adams
> Tiber Creek Consulting
> http://www.tibercreek.com
> glenn@tibercreek.com
> ----------------------------------------------
> Please DO NOT respond to me directly but post all responses here in the
> newsgroup so that all can share the information.
>
>
> Vicky wrote:
> > I am using C# .Net to customize the RMS. As RMS is in VB, the customization
> > guide is not so usefull for me. How should I create my .Net dll ?? I have
> > added QSResult reference to my project, but as QSResult does not have a
> > strong name I am not able to create a strong name for my project dll also..
> >
> > Can any help me out and tell me the steps to create, deploy and invoke .Net
> > dll in RMS...
> >
> > Waiting for reply... :-(
> >
> > Vicky... :-)
>

Posted by RetailHero(tm) on March 23, 2006, 3:49 pm
Please log in for more thread options
Glen, Vicky:

using VB isn' really "the only way". You can use method invocation in C#,
like in the following example. But I must agree with you it is rather very
painful. I hope Microsoft provides .NET wrapper for QSRules.dll soon. If help
is needed, Retail Hero is certainly ready to volunteer. :-)

public void ShowTransactionEntriesPrices(object session)
{
try
{
object transaction = session.GetType().InvokeMember("Transaction",
BindingFlags.GetProperty, null, session, null);
object transactionEntries =
transaction.GetType().InvokeMember("Entries", BindingFlags.GetProperty, null,
transaction, null);

int transactionEntriesCount =
(int)transactionEntries.GetType().InvokeMember("Count",
BindingFlags.GetProperty, null, transactionEntries, null);

for (int i = 0; i < transactionEntriesCount; i++)
{
object transactionEntry =
transactionEntries.GetType().InvokeMember("Element",
BindingFlags.GetProperty, null, transactionEntries, new object[] {i + 1});


MessageBox.Show(transactionEntry.GetType().InvokeMember("Price",
BindingFlags.GetProperty, null, transactionEntry, null).ToString());
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}


"Glenn Adams [MVP - Retail Mgmt]" wrote:

> The only way I was ever able to get a C# add-in to work was to create a
> vb.net add-in to catch the COM call from the RMS hook then invoke my c#
> add-in from there. Your problem is really with COM Interop, not
> specifically with RMS - there is some information on MSDN that should
> help you get past the strong naming issue, but there are going to be
> more roadblocks after that. vb.net is much easier to deal with...
>
> Glenn Adams
> Tiber Creek Consulting
> http://www.tibercreek.com
> glenn@tibercreek.com
> ----------------------------------------------
> Please DO NOT respond to me directly but post all responses here in the
> newsgroup so that all can share the information.
>
>
> Vicky wrote:
> > I am using C# .Net to customize the RMS. As RMS is in VB, the customization
> > guide is not so usefull for me. How should I create my .Net dll ?? I have
> > added QSResult reference to my project, but as QSResult does not have a
> > strong name I am not able to create a strong name for my project dll also..
> >
> > Can any help me out and tell me the steps to create, deploy and invoke .Net
> > dll in RMS...
> >
> > Waiting for reply... :-(
> >
> > Vicky... :-)
>

Posted by Glenn Adams [MVP - Retail Mgmt on March 23, 2006, 10:06 pm
Please log in for more thread options
Like I said, vb.Net is much easier to deal with... I'm generally
agnostic toward .Net languages, but because of some poor implementation
decisions around RMS, vb.Net seems like an obvious choice for RMS add-ins.

Glenn Adams
Tiber Creek Consulting
http://www.tibercreek.com
glenn@tibercreek.com
----------------------------------------------
Please DO NOT respond to me directly but post all responses here in the
newsgroup so that all can share the information.


RetailHero(tm) wrote:
> Glen, Vicky:
>
> using VB isn' really "the only way". You can use method invocation in C#,
> like in the following example. But I must agree with you it is rather very
> painful. I hope Microsoft provides .NET wrapper for QSRules.dll soon. If help
> is needed, Retail Hero is certainly ready to volunteer. :-)
>
> public void ShowTransactionEntriesPrices(object session)
> {
> try
> {
> object transaction = session.GetType().InvokeMember("Transaction",
> BindingFlags.GetProperty, null, session, null);
> object transactionEntries =
> transaction.GetType().InvokeMember("Entries", BindingFlags.GetProperty, null,
> transaction, null);
>
> int transactionEntriesCount =
> (int)transactionEntries.GetType().InvokeMember("Count",
> BindingFlags.GetProperty, null, transactionEntries, null);
>
> for (int i = 0; i < transactionEntriesCount; i++)
> {
> object transactionEntry =
> transactionEntries.GetType().InvokeMember("Element",
> BindingFlags.GetProperty, null, transactionEntries, new object[] {i + 1});
>
>
> MessageBox.Show(transactionEntry.GetType().InvokeMember("Price",
> BindingFlags.GetProperty, null, transactionEntry, null).ToString());
> }
> }
> catch(Exception ex)
> {
> MessageBox.Show(ex.Message);
> }
> }
>
>
> "Glenn Adams [MVP - Retail Mgmt]" wrote:
>
>> The only way I was ever able to get a C# add-in to work was to create a
>> vb.net add-in to catch the COM call from the RMS hook then invoke my c#
>> add-in from there. Your problem is really with COM Interop, not
>> specifically with RMS - there is some information on MSDN that should
>> help you get past the strong naming issue, but there are going to be
>> more roadblocks after that. vb.net is much easier to deal with...
>>
>> Glenn Adams
>> Tiber Creek Consulting
>> http://www.tibercreek.com
>> glenn@tibercreek.com
>> ----------------------------------------------
>> Please DO NOT respond to me directly but post all responses here in the
>> newsgroup so that all can share the information.
>>
>>
>> Vicky wrote:
>>> I am using C# .Net to customize the RMS. As RMS is in VB, the customization
>>> guide is not so usefull for me. How should I create my .Net dll ?? I have
>>> added QSResult reference to my project, but as QSResult does not have a
>>> strong name I am not able to create a strong name for my project dll also..
>>>
>>> Can any help me out and tell me the steps to create, deploy and invoke .Net
>>> dll in RMS...
>>>
>>> Waiting for reply... :-(
>>>
>>> Vicky... :-)

Similar ThreadsPosted
difficulty posting RMS suggestion to Dynamics webstie September 30, 2008, 7:06 pm
Creating a DLL in C# August 25, 2008, 2:29 pm
Creating an Add-in for POS 2.0 November 29, 2008, 4:31 pm
creating offline db July 19, 2005, 8:19 pm
Creating new items - something doesn't add up here September 28, 2005, 6:56 am
Help creating items January 5, 2006, 5:30 pm
Creating RMS POS Com Object June 26, 2006, 5:27 pm
HQ creating duplicate POs after 340 August 1, 2006, 7:31 pm
Creating PO/transfers August 23, 2007, 10:08 am
Creating New Items and HQ and SO March 28, 2008, 10:53 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