SMT Project Development Book (1)

zhaozj2021-02-16  45

Finally, the system design is finished, starting to do a framework today, write code.

The only problem today is the problem of .NET CF calls COM components. I hope to build the entire frame with .NET to facilitate maintenance and deployment.

Some of the online check articles is found to call COM components directly. Need to write a Native API package CoM. I am really a shit. .

Quote http://www.move-to.net/comm/forum/net_compact_framework/531.aspx

"

Quoted on the 199th page of the .NET Compact Framework Core Reference:

To access COM objects. There is no COM Interop in the .NET Compact Framework, so transparent access to COM objects is not possible. You can still use COM objects, but you must use eMbedded Visual C to create a flat wrapper around the object implementing Sufficient Function Calls to Use the COM Object. You Use P / Invoke To Call Functions in The Dynamic Link Library (DLL) Containing Your Wrapper. This Technique Requires Knowledge of COM and C .

?

It means that .Net Compact Framework does not directly support the use of COM objects, but you can use EVC to reapperate the COM object, then in the .NET Compact Framework, call API (P / Invoke) Go to call you to write a good Flat Wrapper so that you can achieve the same purpose.

The actual example can refer to the chapter starting with the book P.732.

?

In your example, you can use EVC to first design the function you want to count the API, then make a DLL file, call the Function Call in the DLL in .Netcf.

"

Refer to the Microsoft website related articles, found that only the EVC writes a DLL, let CF calls? That will be completed in the realization code tomorrow.

?

?

?

转载请注明原文地址:https://www.9cbs.com/read-20648.html

New Post(0)