Hello every one...while reading specification of COM on msdn i want to do some accessing thing in provided shell32.dll or in some in- process servers. So by default as you all know about com we need guids of classes and interfaces built in them to make use of them...but for now i want to access shell32.dll server's classes and interfaces...for that most or all of their guids are provided in uuid.lib file in ms sdk dir. So the problem is how to link this lib file for resolving extranal references with my asm file...
By including it maybe?
include \masm32\include\masm32rt.inc
includelib "C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\Uuid.Lib"
.code
AppName db "Masm32:", 0
start: MsgBox 0, "Hello World", addr AppName, MB_OK
exit
ExternDef BHID_Filter:DWORD
mov eax, BHID_Filter ; just a test
end start
Thanks jj.., i did that early but no use... at ml.exe stage where still showing that the symbols are undefined...
Is there any way to link it with my prog externally...?
Hi shaikkareem,
could you post the critical code, please? So we can test it and find the errors.
Gunther
Quote from: shaikkareem on October 03, 2014, 06:54:50 PM
Thanks jj.., i did that early but no use... at ml.exe stage where still showing that the symbols are undefined...
Is there any way to link it with my prog externally...?
You need to define them, as I did tentatively with the ExternDef
Often, you need only a few, so you can dig into the *.h and translate them "by hand". Otherwise, search the forum for
header threads posted by vortex
uuid.lib is filled with numerous GUID's and CLSID's
as far as i know, it has no code or other data in it
generally, you can google the specific one you want and add it to the data section
Thanks ded and jj but as you said defining them manually or googling them and entering in data section is not good as you think, i had tried that way but most of that given bad result...simply googling with CLSID_ or IID_ prefixes dont give result as my experience. Could you guys know an utility which explores the content of a lib file so that i get the ids encoded in uuid and then manually drfine them....?
well - the library (libraries, actually - there are a few different ones) is designed for use with the MS C compilers
the compiler code "knows" which GUID's are in the library
but, you can use Erol's lib2def tool to generate a list of exports
from that DEF file, you can easily make an include file
http://vortex.masmcode.com/ (http://vortex.masmcode.com/)
wouldn't be hard to write a little program to dump the contents :P
correct syntax
includelib uuid.lib ;or another
EXTERNDEF IID_MYIID:GUID
Hi Dave,
Quote from: dedndave on October 04, 2014, 12:47:57 AM
but, you can use Erol's lib2def tool to generate a list of exports
from that DEF file, you can easily make an include file
http://vortex.masmcode.com/ (http://vortex.masmcode.com/)
that's the way to go. By the way, Erol's tool is very helpful.
Gunther
i guess i could write a little program to dump the contents of these libraries
then, you can grab the one you need and add it to your code
there are other similar libraries besides uuid.lib, like dxguid, wbemuuid, wiaguid, etc
here a mixed content of further uuid lib,syntax masm
Guys really your help is appreciable and the vortex tools are very helpfull to solve my problem with libraries inclussion ... i used the tools available at vortex page and had overcome the problem. Now the ml.exe and link.exe recognizing the extranal symbols provided in prog.
Genarally used lib2inc .exe which generated a uuid.inc file, and i included both the .lib and .inc versions of uuid and the error was no longer appeared during compilation and execution. :icon14: