I posted earlier in the general area about creating shortcuts. I understand I have to do this with the COM interface. When I downloaded the Masm32sp1 I got a COM example for creating shortcuts. However when I try to compile it myself I get erros in the com include files. Any suggestions? Thanks, Ben
Posted on 2001-01-25 13:50:00 by cyberben
Upon closer examination of the includes. This is one of the lines it complains about: IFileViewerSite STRUCT _vtIFileViewerSite IFileViewerSite IFileViewerSite ENDS How come there is no initializer on that structure component? That's what it doesn't like, there are many like this... - Ben
Posted on 2001-01-25 13:56:00 by cyberben
"_vtIFileViewerSite" is a macro (it's in shlobj.inc), "IFileViewerSite" is a textstring to name the members. It is used to make the structure for the vtable for the IFileViewerSite interface. For this to work, the oaidl.inc file MUST be included before it. Question: Are you compiling the sample program "MakeLink.asm", or something else?
Posted on 2001-01-25 14:42:00 by Ernie
I was able to compile and link MakeLink.asm fine, but I needed to change MessageBox to either MessageBoxA or MessageBoxW. (There is no default MessageBox equ MessageBoxA in the files included in MakeLink.asm). Had some trouble with make.bat in M32LIB. Three error messages: framegrp.asm (108), frameview.asm (66), framectrl.asm (93): Too many args to invoke. But the file masm32.lib is included with Service Pack 1 and I just copied it directly. By the way, the book Windows 2000 System Programming (Coriolis) by A. Williams has a useful chapter (Chap. 10) on shell programming and gives a listing on p. 443 that shows how to create a shortcut programmatically. (Ernie's comments): Alan must be building inside a different enviroment then masm32. "MessageBox" is declared in user32.inc, which is included in MakeLink. I could not guess as to why framegrp.asm, frameview.asm, or framectrl.asm in the masm32 lib refused to recompile. Alan, did you install MASM32 itself, or just the service pack? You need both. This message was edited by Ernie, on 1/27/2001 3:07:58 PM
Posted on 2001-01-27 14:03:00 by Alan Mason
Neither the example or my program will compile, I tried both and they both have the same errors. I can't figure out what would be different in my configuration than yours that could make it not compile on my machine but on yours? Urrgggg.... - Ben
Posted on 2001-01-27 14:38:00 by cyberben
Strange... others have not had these problems. So... let's review the basics. 1) My masm directory is at C:\masm32\ 2) The COM stuff inside there at C:\masm32\COM\ 3) path reference are for relative paths, so theoretically, other drives should also work (but untried by me) 4) I've used both the current MASM version, and the service pack upgrade version, both were fine. (ONLY difference is colib needs to be re-built to whatever masm32 lib you are using)(Not really applicable to MakeLink.asm, it doesn't use colib) 5) The make file is simply calling the buildall batfile in \masm32\bin\ like so: \masm32\BIN\BLDALL.BAT makelink Ben, please try compiling it once more, from at dos box at the same folder as MakeLink.asm, using the following line: C:\masm32\COM\examples\shortcut\testbld> C:\masm32\COM\examples\shortcut\testbld>\masm32 BIN\ml /c /Fl /coff makelink.asm >b.txt Then either post b.txt here, or email to me direct and I'll have a look. If you email it, also send MakeLink.lst if you can. Sorry you are having this trouble. This message was edited by Ernie, on 1/27/2001 3:01:29 PM
Posted on 2001-01-27 14:59:00 by Ernie
I tried again, being sure to run make.bat from a DOS box (under Win2000) from the masm32SP1 directory. Found two problematic files, bmpbutn.asm and fntdlg.asm. Their include statements refer to D:\masm32\... . The D: should be omitted (use relative paths; my drive is J). Then all the files assemble okay. For some reason the system isn't finding masm32.inc in J:\masm32SP1, even though it's definitely there. Instead, a Popup message asks me what application I want to use to open masm32.inc with. If I specify qeditor, the app opens with a message saying masm32.inc can't be found. This is weird and must be a Windows error. About the failure to find MessageBox -- that was my fault. I commented out the equ statements because under Win2000 I want W defaults; instead I should simply have replaced each A by a W.
Posted on 2001-01-27 17:25:00 by Alan Mason
Ernie: I'll email you the output file and the list file. I don't have a website to put it on at the moment and I doubt anyone else wants me to post a zillion lines of output stuff. See ya, Ben
Posted on 2001-01-27 17:54:00 by cyberben
Ernie, I had a mild problem when I first started to review you Short-cut COM example. When i complied it with the make.bat I got one error about unable to find shell32.inc or something to that extent... I tracked it down to: ; Shlobj.inc ; Version 1.0 - April 9, 1999- by Bill T. ; Version 1.01 - March 18, 2000 - E Murphy for omission of GetPath in IShellLink vtable ; Version 2.0 Dec 26, 2000 - E Murphy Interfaces revised for MASM32 ;-------------------------------------------------------------------------------------------------- includelib shell32.lib I changed this line to: includelib \masm32\lib\shell32.lib and everything worked fine... Perhaps some of the above problems follow the same suit... My system has no %path% to the masm dir either.. NaN
Posted on 2001-01-28 19:07:00 by NaN
Nan, Good find, though it would be nice if a .inc file for a .dll also would bring in the .lib too. Just a matter of all agreeing on a standard place for em, and then using that property E
Posted on 2001-01-29 00:37:00 by Ernie