From: Tomasz Staroszczyk on
I'm looking for a document, tutorial or clear example on how to start
RIL development on VS (C#). Having the .lib and .h provided in previous
posts still can't figure out what to do with it. How to convert it to a
..dll? Please help, thankful for any comments.
From: " ctacke/>" on
You can't create a managed DLL from a LIB and a header. If the functions
are compiled into some actual DLL (don't know if the lib is dynamic or
statically linked) then you would use the header file to hand-write a
P/Invoke declaration layer for your C# application. If it's not in a DLL,
then you have to create one in native C that exports functions that you can
in turn P/Invoke.

There are lots of examples an tutorials on the web covering P/Invoke.
Probably none covering RIL specifically (and if it's anything like TAPI,
it's a very complex and difficult beast to wrap so I wish you luck).


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com



"Tomasz Staroszczyk" <tomaszstaroszczyk(a)wp.pl> wrote in message
news:uztdVPZTIHA.4656(a)TK2MSFTNGP03.phx.gbl...
> I'm looking for a document, tutorial or clear example on how to start RIL
> development on VS (C#). Having the .lib and .h provided in previous posts
> still can't figure out what to do with it. How to convert it to a .dll?
> Please help, thankful for any comments.


From: Tomasz Staroszczyk on
<ctacke/> pisze:
> Probably none covering RIL specifically (and if it's anything like TAPI,
> it's a very complex and difficult beast to wrap so I wish you luck).

In fact I only need to use one method of the RIL:
HRESULT RIL_GetCellTowerInfo(HRIL hRil);
, but I'm still confused how a wrapper should look like, and how to
invoke the HRESULT RIL_Initialize(...) method. What do the parameters
stand for?? I'd be grateful for a simple example of that...

From: dbgrick on
You can PInvoke the RIL methods using the DLLImport attribute. Here is a web
site I found by searching for RIL_Initialize and C#. Hopefully this will
help:

http://www.opennetcf.org/forums/post.asp?method=TopicQuote&TOPIC_ID=4001&FORUM_ID=16

Regards,
Rick D.
Contractor

"Tomasz Staroszczyk" wrote:

> <ctacke/> pisze:
> > Probably none covering RIL specifically (and if it's anything like TAPI,
> > it's a very complex and difficult beast to wrap so I wish you luck).
>
> In fact I only need to use one method of the RIL:
> HRESULT RIL_GetCellTowerInfo(HRIL hRil);
> , but I'm still confused how a wrapper should look like, and how to
> invoke the HRESULT RIL_Initialize(...) method. What do the parameters
> stand for?? I'd be grateful for a simple example of that...
>
>
From: " ctacke/>" on
A slightly cleaner URL to the same is:

http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=4001


"dbgrick" <dbgrick(a)discussions.microsoft.com> wrote in message
news:49CF5A24-95C4-422B-BBE6-1883E01D1EA2(a)microsoft.com...
> You can PInvoke the RIL methods using the DLLImport attribute. Here is a
> web
> site I found by searching for RIL_Initialize and C#. Hopefully this will
> help:
>
> http://www.opennetcf.org/forums/post.asp?method=TopicQuote&TOPIC_ID=4001&FORUM_ID=16
>
> Regards,
> Rick D.
> Contractor
>
> "Tomasz Staroszczyk" wrote:
>
>> <ctacke/> pisze:
>> > Probably none covering RIL specifically (and if it's anything like
>> > TAPI,
>> > it's a very complex and difficult beast to wrap so I wish you luck).
>>
>> In fact I only need to use one method of the RIL:
>> HRESULT RIL_GetCellTowerInfo(HRIL hRil);
>> , but I'm still confused how a wrapper should look like, and how to
>> invoke the HRESULT RIL_Initialize(...) method. What do the parameters
>> stand for?? I'd be grateful for a simple example of that...
>>
>>