Ver Mensaje Individual
  #16 (permalink)  
Antiguo 08/03/2007, 16:36
loquillo7
 
Fecha de Ingreso: abril-2005
Mensajes: 501
Antigüedad: 19 años, 9 meses
Puntos: 1
Re: Handheld Windows CE VS.NET 2005

me olvidaba estoy usando tambien un api para leer y escribir un archivo ini:

[DllImport("kernel32")]
private static extern long WritePrivateProfileString(string section,string key,string val,string filePath);
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section,string key,string def, StringBuilder retVal,int size,string filePath);

cuando ejecuto con mi emulador me sale un error en la linea en negirto:

public string IniReadValue(string Section, string Key)
{
StringBuilder temp = new StringBuilder(255);//paro
int i = GetPrivateProfileString(Section, Key, "", temp,255, this.path);
return temp.ToString();

}
"Can't find PInvoke 'kernel32'
Troubleshooting tips:If a method in a class library has been removed or renamed, recompile any assemblies that reference that method.
This exception is typically thrown when an attempt is made to dynamically access a deleted or renamed method of an assembly that is not referenced by its strong name."

eso quiere decir que estas apis las tengo que tener fisicamente en el mobile y por eso da el error o no es posible trabajar con apis en mobiles, esta y mi anterior pregunta espero me ayudes nuevamente gracias