WinCe C# com library (tlh genaration problem)

T

TheSebaster

I wrote the following lines of code under Microsoft Visual Studio 2005:
I compile my WinCE c++ application importing MyInterop.tlb generated file.
The MyInterop.tlh generated file do not contain my interface definition.
Does anyone could help me??

(Aditional info)
-When I open tlb file with visual studio and I expand MyInterop Library, I
don't see any interface
- I generate Interop.tlb with REGASM.EXE myinterop.dll /tlb:MyInterop.tlb
- I also tryed TLBEXP.EXE
- I use Compack Framework 2.0 SP1 (WinCE 5.0)
using System;

using System.Collections.Generic;

using System.Text;

using System.Runtime.InteropServices;

using System.Windows.Forms;

namespace MyInterop

{

[Guid("C5396536-5936-43fc-AE37-6FB083F80829")]

public interface IMyDotNetInterface

{

void ShowCOMDialog();

}

[ClassInterface(ClassInterfaceType.None)]

[Guid("877653A9-F9BC-4849-8EA3-7529D87473A2")]

public class MyDotNetClass : IMyDotNetInterface

{

// Need a public default constructor for COM Interop.

public MyDotNetClass()

{}

public void ShowCOMDialog()

{

System.Windows.Forms.MessageBox.Show("I am a" +

" Managed DotNET C# COM Object Dialog");

}



}
 
T

TheSebaster

My interop.tlh look like that:

#pragma once

#pragma pack(push, 8)

#include <comdef.h>

namespace MyInterop {

} // namespace MyInterop

#pragma pack(pop)
 

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