using COM object in .NET Compact Framework

G

Guest

Hi,
i need to use COM object in my application running on Pocket PC 2003. I used
tlbimp utility to create clr assembly and added it into my project. But when
i try to create instance of COM object

BALSYSLib.BalSystemClass sys = new BALSYSLib.BalSystemClass();

InvalidOperationException is thrown. It is even thrown earlier then the
program reaches that line - propably JIT compiler throws it (it is thrown
while entering procedure containing that code).

I tried to use another COM object same way on PC and it works properly.

Thanks for any help or idea how to solve this problem
 
N

Nicholas Paldino [.NET/C# MVP]

Michal,

Is the COM object installed on the machine that has the CF on it? If it
is not, then you need to install the COM object, as well as the assembly
generated.

Hope this helps.
 
G

Guest

The COM object is installed, generated assembly is not - it is just copied to
the same directory. I use Visual Studio .net 2003 it copied that assembly.
What i am suprised is that if i do the same thing on PC platform instad of
Pocket PC i works. Is it possible that it is some kind of bug in .NET Compact
Framework?




Nicholas Paldino said:
Michal,

Is the COM object installed on the machine that has the CF on it? If it
is not, then you need to install the COM object, as well as the assembly
generated.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Michal Rizek said:
Hi,
i need to use COM object in my application running on Pocket PC 2003. I
used
tlbimp utility to create clr assembly and added it into my project. But
when
i try to create instance of COM object

BALSYSLib.BalSystemClass sys = new BALSYSLib.BalSystemClass();

InvalidOperationException is thrown. It is even thrown earlier then the
program reaches that line - propably JIT compiler throws it (it is thrown
while entering procedure containing that code).

I tried to use another COM object same way on PC and it works properly.

Thanks for any help or idea how to solve this problem
 
N

Nicholas Paldino [.NET/C# MVP]

Michal,

Ahh, looking around, the CF does not support full COM interop. Check
the section of MSDN titled "Writing Unmanaged Functions for Microsoft .NET
Compact Framework-based Applications", located at (watch for line wrap):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/unmanagedfuncs.asp

Also, when searching, I found this, which appears to offer full COM
interop for the CF (but I can't vouch for whether or not it works, it might
work for you):

http://whitepapers.zdnet.co.uk/0,39025945,60065442p-39000416q,00.htm


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Michal Rizek said:
The COM object is installed, generated assembly is not - it is just copied
to
the same directory. I use Visual Studio .net 2003 it copied that assembly.
What i am suprised is that if i do the same thing on PC platform instad of
Pocket PC i works. Is it possible that it is some kind of bug in .NET
Compact
Framework?




Nicholas Paldino said:
Michal,

Is the COM object installed on the machine that has the CF on it? If
it
is not, then you need to install the COM object, as well as the assembly
generated.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Michal Rizek said:
Hi,
i need to use COM object in my application running on Pocket PC 2003. I
used
tlbimp utility to create clr assembly and added it into my project. But
when
i try to create instance of COM object

BALSYSLib.BalSystemClass sys = new BALSYSLib.BalSystemClass();

InvalidOperationException is thrown. It is even thrown earlier then the
program reaches that line - propably JIT compiler throws it (it is
thrown
while entering procedure containing that code).

I tried to use another COM object same way on PC and it works properly.

Thanks for any help or idea how to solve this problem
 
G

Guest

Thanks a lot. I will check it out....

Nicholas Paldino said:
Michal,

Ahh, looking around, the CF does not support full COM interop. Check
the section of MSDN titled "Writing Unmanaged Functions for Microsoft .NET
Compact Framework-based Applications", located at (watch for line wrap):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/unmanagedfuncs.asp

Also, when searching, I found this, which appears to offer full COM
interop for the CF (but I can't vouch for whether or not it works, it might
work for you):

http://whitepapers.zdnet.co.uk/0,39025945,60065442p-39000416q,00.htm


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Michal Rizek said:
The COM object is installed, generated assembly is not - it is just copied
to
the same directory. I use Visual Studio .net 2003 it copied that assembly.
What i am suprised is that if i do the same thing on PC platform instad of
Pocket PC i works. Is it possible that it is some kind of bug in .NET
Compact
Framework?




Nicholas Paldino said:
Michal,

Is the COM object installed on the machine that has the CF on it? If
it
is not, then you need to install the COM object, as well as the assembly
generated.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi,
i need to use COM object in my application running on Pocket PC 2003. I
used
tlbimp utility to create clr assembly and added it into my project. But
when
i try to create instance of COM object

BALSYSLib.BalSystemClass sys = new BALSYSLib.BalSystemClass();

InvalidOperationException is thrown. It is even thrown earlier then the
program reaches that line - propably JIT compiler throws it (it is
thrown
while entering procedure containing that code).

I tried to use another COM object same way on PC and it works properly.

Thanks for any help or idea how to solve this problem
 
S

Sam Gentile [MVP - .NET/C#, INETA Speaker]

You may also be interested in knowing that full COM Interop is supported in
the Whidbey CF.

--
Sam Gentile
Microsoft MVP - .NET/C#
INETA Speaker
CLR Blog: http://samgentile.com/blog
..NET Portal and Slides http://samgentile.com/

Michal Rizek said:
Thanks a lot. I will check it out....

Nicholas Paldino said:
Michal,

Ahh, looking around, the CF does not support full COM interop. Check
the section of MSDN titled "Writing Unmanaged Functions for Microsoft
.NET
Compact Framework-based Applications", located at (watch for line wrap):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/unmanagedfuncs.asp

Also, when searching, I found this, which appears to offer full COM
interop for the CF (but I can't vouch for whether or not it works, it
might
work for you):

http://whitepapers.zdnet.co.uk/0,39025945,60065442p-39000416q,00.htm


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Michal Rizek said:
The COM object is installed, generated assembly is not - it is just
copied
to
the same directory. I use Visual Studio .net 2003 it copied that
assembly.
What i am suprised is that if i do the same thing on PC platform instad
of
Pocket PC i works. Is it possible that it is some kind of bug in .NET
Compact
Framework?




:

Michal,

Is the COM object installed on the machine that has the CF on it?
If
it
is not, then you need to install the COM object, as well as the
assembly
generated.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

message
Hi,
i need to use COM object in my application running on Pocket PC
2003. I
used
tlbimp utility to create clr assembly and added it into my project.
But
when
i try to create instance of COM object

BALSYSLib.BalSystemClass sys = new BALSYSLib.BalSystemClass();

InvalidOperationException is thrown. It is even thrown earlier then
the
program reaches that line - propably JIT compiler throws it (it is
thrown
while entering procedure containing that code).

I tried to use another COM object same way on PC and it works
properly.

Thanks for any help or idea how to solve this problem
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top