how to read COM in C# ---------Please help me
-
I am having following code in delphi language. i want to convert it into C# The delphi contains CreateOleObject method. but in .net we are not having such method. how to convert it. code: //set com port Comet := CreateOleObject('Comteck.xy'); Comet.ComPort := "COM1"; I wamt to Use that 'Comteck.xy' file compulsary. please help me. Thanks in advance gaurav
-
I am having following code in delphi language. i want to convert it into C# The delphi contains CreateOleObject method. but in .net we are not having such method. how to convert it. code: //set com port Comet := CreateOleObject('Comteck.xy'); Comet.ComPort := "COM1"; I wamt to Use that 'Comteck.xy' file compulsary. please help me. Thanks in advance gaurav
Right click your project in VS and select "Add reference". Then select your COM object from the list of installed objects. .Net will create a managed wrapper class (RCW) which you can use to instantiate the object and access it like it was a managed object.