Coger la version del fichero .exe

Coger la version del fichero .exe

Postby softruz » Thu Nov 06, 2008 9:46 am

Muy buenas estoy intentando coger la version del fichero .exe de la PocketPc, he cogido una funcion programada en C pero me da muchos errores al compilar.

¿ Me podreis decir algo sobre esto ?

Un Saludo.
softruz
 
Posts: 485
Joined: Fri Feb 09, 2007 10:34 am

Postby Antonio Linares » Thu Nov 06, 2008 9:58 am

Estas usando FWH\samples\FileVer.prg ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41289
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re:

Postby softruz » Thu Nov 06, 2008 10:22 am

Si estoy usando esa funcion pero me dá errores como:

Almacen.prg(1318) : error C2664: 'GetFileVersionInfoSizeW' : cannot convert parameter 1 from 'char *' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Almacen.prg(1326) : error C2065: 'GlobalAlloc' : undeclared identifier
Almacen.prg(1326) : error C2065: 'GMEM_MOVEABLE' : undeclared identifier
Almacen.prg(1326) : error C2440: 'initializing' : cannot convert from 'int' to 'void *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Almacen.prg(1332) : error C2065: 'GlobalLock' : undeclared identifier
Almacen.prg(1332) : error C2440: 'initializing' : cannot convert from 'int' to 'void *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Almacen.prg(1334) : error C2664: 'GetFileVersionInfoW' : cannot convert parameter 1 from 'char *' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Almacen.prg(1336) : error C2664: 'VerQueryValueW' : cannot convert parameter 2 from 'char [25]' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Almacen.prg(1393) : error C2664: 'VerQueryValueW' : cannot convert parameter 2 from 'char *' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Almacen.prg(1400) : error C2065: 'GlobalUnlock' : undeclared identifier
Almacen.prg(1401) : error C2065: 'GlobalFree' : undeclared identifier
LINK : fatal error LNK1181: cannot open input file 'Almacen.obj'

Un Saludo.
softruz
 
Posts: 485
Joined: Fri Feb 09, 2007 10:34 am

Re:

Postby softruz » Mon Nov 10, 2008 8:07 am

Muy buenas, ¿alguien sabe porqué me dan los errores anteriores?

Un Saludo.
softruz
 
Posts: 485
Joined: Fri Feb 09, 2007 10:34 am

Postby jlcapel » Mon Nov 10, 2008 9:17 pm

Softruz,

Muéstranos el código de esa función. Por lo que puedo ver... hay que hacer algún trabajo extra para que funcione 100x100 en PPC.
User avatar
jlcapel
 
Posts: 229
Joined: Wed Oct 12, 2005 5:32 pm
Location: Valencia - España

Postby Antonio Linares » Tue Nov 11, 2008 8:25 am

Tienes que cambiar todas las llamadas a Global...() por Local...()

Y en la función GetFileVersionInfoSize() te está pidiendo un puntero a una cadena "wide" en vez de a una cadena tradicional (char *). Tienes que usar AnsiToWide(). Revisa el código en C de FWPPC en donde usamos AnsiToWide() y WideToAnsi().
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41289
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Pocket PC

Who is online

Users browsing this forum: No registered users and 5 guests