Thread overview
Does implib /s switch work?
Feb 22, 2006
A. Fontana
Feb 23, 2006
Bertel Brander
Feb 23, 2006
A. Fontana
Feb 23, 2006
Bertel Brander
February 22, 2006
Using

implib /s C:\......\msvfw32.lib c:\.......\msvfw32.dll

the file msvfw32.lib is generated but there's no "_" prepend to import function. Linker gives me errors (becouse it can't find some functions). On my partial compiled file there's a reference for msvfw32.dll but all functions are defined without "_" !

A. Fontana


February 23, 2006
A. Fontana wrote:
> Using 
> 
> implib /s C:\......\msvfw32.lib c:\.......\msvfw32.dll
> 
> the file msvfw32.lib is generated but there's no "_" prepend to import function.
> Linker gives me errors (becouse it can't find some functions). On my partial
> compiled file there's a reference for msvfw32.dll but all functions are defined
> without "_" !

Yes, it works.

Building the .lib with this command:
implib.exe /s msvfw32.lib C:\WINDOWS\system32\msvfw32.dll

I can create this program:

#include <windows.h>
extern "C" {
BOOL GetOpenFileNamePreview(LPOPENFILENAME lpofn);
}
void OnFileOpen()
{
   static char Filter[] = "jpg (*.jpg)\0*.jpg\0All (*.*)\0*.*\0";
   char CurrentFileName[1024];
   OPENFILENAME OpenFilename;
   memset(&OpenFilename, 0, sizeof(OpenFilename));
   OpenFilename.lStructSize = sizeof(OpenFilename);
   OpenFilename.hwndOwner = 0;
   OpenFilename.hInstance = 0;
   OpenFilename.lpstrFilter = Filter;
   OpenFilename.lpstrFile = CurrentFileName;
   OpenFilename.nMaxFile = sizeof(CurrentFileName);
   OpenFilename.Flags = OFN_FILEMUSTEXIST;
   OpenFilename.lpstrDefExt = "txt";

   if(GetOpenFileNamePreview(&OpenFilename))
   {
   }
}

int main()
{
   OnFileOpen();
}

And compile it with:
dmc ofn.cpp msvfw32.lib

And it works.

-- 
Absolutely not the best homepage on the net:
http://home20.inet.tele.dk/midgaard
But it's mine - Bertel
February 23, 2006
In article <dtj01q$hik$1@digitaldaemon.com>, Bertel Brander says...
>
>A. Fontana wrote:
>> Using
>> 
>> implib /s C:\......\msvfw32.lib c:\.......\msvfw32.dll
>> 
>> the file msvfw32.lib is generated but there's no "_" prepend to import function. Linker gives me errors (becouse it can't find some functions). On my partial compiled file there's a reference for msvfw32.dll but all functions are defined without "_" !
>
>Yes, it works.
>
>Building the .lib with this command:
>implib.exe /s msvfw32.lib C:\WINDOWS\system32\msvfw32.dll
>
>I can create this program:
>
>#include <windows.h>
>extern "C" {
>BOOL GetOpenFileNamePreview(LPOPENFILENAME lpofn);
>}
>void OnFileOpen()
>{
>    static char Filter[] = "jpg (*.jpg)\0*.jpg\0All (*.*)\0*.*\0";
>    char CurrentFileName[1024];
>    OPENFILENAME OpenFilename;
>    memset(&OpenFilename, 0, sizeof(OpenFilename));
>    OpenFilename.lStructSize = sizeof(OpenFilename);
>    OpenFilename.hwndOwner = 0;
>    OpenFilename.hInstance = 0;
>    OpenFilename.lpstrFilter = Filter;
>    OpenFilename.lpstrFile = CurrentFileName;
>    OpenFilename.nMaxFile = sizeof(CurrentFileName);
>    OpenFilename.Flags = OFN_FILEMUSTEXIST;
>    OpenFilename.lpstrDefExt = "txt";
>
>    if(GetOpenFileNamePreview(&OpenFilename))
>    {
>    }
>}
>
>int main()
>{
>    OnFileOpen();
>}
>
>And compile it with:
>dmc ofn.cpp msvfw32.lib
>
>And it works.
>
>-- 
>Absolutely not the best homepage on the net:
>http://home20.inet.tele.dk/midgaard
>But it's mine - Bertel

Hey you didn't use any function inside lib :) Try to define one of them!


February 23, 2006
A. Fontana wrote:
> 
> Hey you didn't use any function inside lib :) Try to define one of them!
> 

The code use GetOpenFileNamePreview.

If I don't link to msvfw32.lib I get:

ofn.obj(ofn)
 Error 42: Symbol Undefined _GetOpenFileNamePreview

So I think I use GetOpenFileNamePreview from the lib/dll.

-- 
Absolutely not the best homepage on the net:
http://home20.inet.tele.dk/midgaard
But it's mine - Bertel