Click here to Skip to main content
15,843,031 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,
i am trying to use OPC(as a client) in wince these days, to access to an OPC Server in XP, in this way i know have to add DCOMCNFG.exe,RegsvrCE.exe,NTLMUser.exe, however, i don't know haow to do this step? can someone be familar with DCOM in wince? thanks!
Posted
Comments
johannesnestler 12-Apr-11 5:21am    
DCOM wince - are you a little confused? Do you have an OPC client implementation for your CE? If you tell me which version of win CE, which opc server (Siemens?) maybe I can help. I use WinCE 5 (industrial controler layout) as a opc server and client but with an inhouse driver. Another question: Do you/your company (OEM?) build your own CE with platformbuilder? Can be difficult to bring something to a CE-Image...
congpchen 24-Apr-11 23:02pm    
Hello,
these days i am trying to connect to an OPC Server in Wince, and i programmed my OPC client in C#,and there is a method can collect to a Remote COM Server: GetTypeFromProgID. however, it can't be used in Wince becuase there is no overload method to connect to Romote Computer.so what should i do next?thanks!
in XP:
//
// Summary:
// Gets the type associated with the specified program identifier (ProgID),
// returning null if an error is encountered while loading the System.Type.
//
// Parameters:
// progID:
// The ProgID of the type to get.
//
// Returns:
// The type associated with the specified ProgID, if progID is a valid entry
// in the registry and a type is associated with it; otherwise, null.
//
// Exceptions:
// System.ArgumentException:
// progID is null.
public static Type GetTypeFromProgID(string progID);
//
// Summary:
// Gets the type associated with the specified program identifier (ProgID),
// specifying whether to throw an exception if an error occurs while loading
// the type.
//
// Parameters:
// progID:
// The ProgID of the type to get.
//
// throwOnError:
// true to throw any exception that occurs.-or- false to ignore any exception
// that occurs.
//
// Returns:
// The type associated with the specified program identifier (ProgID), if progID
// is a valid entry in the registry and a type is associated with it; otherwise,
// null.
//
// Exceptions:
// System.ArgumentException:
// progID is null.
//
// System.Runtime.InteropServices.COMException:
// The specified ProgID is not registered.
public static Type GetTypeFromProgID(string progID, bool throwOnError);
//
// Summary:
// Gets the type associated with the specified program identifier (progID) from
// the specified server, returning null if an error is encountered while loading
// the type.
//
// Parameters:
// progID:
// The progID of the type to get.
//
// server:
// The server from which to load the type. If the server name is null, this
// method automatically reverts to the local machine.
//
// Returns:
// The type associated with the specified program identifier (progID), if progID
// is a valid entry in the registry and a type is associated with it; otherwise,
// null.
//
// Exceptions:
// System.ArgumentException:
// prodID is null.
public static Type GetTypeFromProgID(string progID, string server);
//
// Summary:
// Gets the type associated with the specified program identifier (progID) from
// the specified server, specifying whether to throw an exception if an error
// occurs while loading the type.
//
// Parameters:
// progID:
// The progID of the System.Type to get.
//
// server:
// The server from which to load the type. If the server name is null, this
// method automatically reverts to the local machine.
//
// throwOnError:
// true to throw any exception that occurs.-or- false to ignore any exception
// that occurs.
//
// Returns:
// The System.Type associated with the specified program identifier (progID),
// if progID is a valid entry in the registry and a type is associated with
// it; otherwise, null.
//
// Exceptions:
// System.ArgumentExce
congpchen 12-Apr-11 5:49am    
hello,johannesnestler.
thank you very much for your answer.well, i am using wince 5.0, and i write my own opc client in c#(running in Wince) with visual studio 2005 to collect to the OPC Server(Matrikon.OPC.Simulation.1) which is running in XP.and we can build my own Wince-Image with PB, maybe it's not so difficult to bring something to the CE-Image.
this is my situation. many thanks!
johannesnestler 12-Apr-11 10:36am    
Hi congpchen,

The good news is you have PB - So first I would start adding the dcomcnfg (and regsvrCE, ntlmuser) to your image. After that you should be able to configure it. For me this is theoretical (because I have a proxy dll and just register it). Did you have a look at this article on CP? http://www.codeproject.com/KB/windows/WindowsCE_DCOM.aspx - I'd try this, if you got stuck you can ask me again.
congpchen 12-Apr-11 22:37pm    
Hi,johannesnestler,

i have read the article you mentioned before, this is a quite good article. and i have added DCOM before building the Image.however, i can't find the DCOMCNFG and RegsvrCE.exe in wince, i don't know why. if possible, please send me some picture about how to finish this step,thanks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900