F
Freestyler
at http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=88 I've found a
function listed below.I've added OpenNETCF.WinAPI library. The proof is that
I can seeOpenNETCF.WinAPI.dll in my programs directory on PocketPC. But
still "'CreateProcess' does not exist in the class or namespace " The only
CreateProcess method i've found is inOpenNETCF.WinAPI.Core, but it takes 2
arguments.Whats wrong?RegsFredListingublic static string
GetSerialNumber(){ const string m_strAssetDataFile =
@"\Windows\cpqAssetData.dat"; System.IO.FileStream fs = new
System.IO.FileStream(m_strAssetDataFile,System.IO.FileMode.Open); try {
if(File.Exists(m_strAssetDataFile) == false) { ProcessInfo pi = new
ProcessInfo(); byte [] si = new byte[128];
CreateProcess(@"\Windows\CreateAssetFile.exe", null, IntPtr.Zero,
IntPtr.Zero, 0, 0, IntPtr.Zero, IntPtr.Zero, si, pi); } byte []
m_bytAssetData = new byte[5216];
fs.Read(m_bytAssetData,0,m_bytAssetData.GetUpperBound(0)); return
System.Text.UnicodeEncoding.Unicode.GetString(m_bytAssetData,10,24); }
catch(Exception ex) { return ex.Message; } finally { fs.Close(); fs =
null; } }
function listed below.I've added OpenNETCF.WinAPI library. The proof is that
I can seeOpenNETCF.WinAPI.dll in my programs directory on PocketPC. But
still "'CreateProcess' does not exist in the class or namespace " The only
CreateProcess method i've found is inOpenNETCF.WinAPI.Core, but it takes 2
arguments.Whats wrong?RegsFredListingublic static string
GetSerialNumber(){ const string m_strAssetDataFile =
@"\Windows\cpqAssetData.dat"; System.IO.FileStream fs = new
System.IO.FileStream(m_strAssetDataFile,System.IO.FileMode.Open); try {
if(File.Exists(m_strAssetDataFile) == false) { ProcessInfo pi = new
ProcessInfo(); byte [] si = new byte[128];
CreateProcess(@"\Windows\CreateAssetFile.exe", null, IntPtr.Zero,
IntPtr.Zero, 0, 0, IntPtr.Zero, IntPtr.Zero, si, pi); } byte []
m_bytAssetData = new byte[5216];
fs.Read(m_bytAssetData,0,m_bytAssetData.GetUpperBound(0)); return
System.Text.UnicodeEncoding.Unicode.GetString(m_bytAssetData,10,24); }
catch(Exception ex) { return ex.Message; } finally { fs.Close(); fs =
null; } }