Help with the "GAK" sample shell extension

Posted on 1998-04-13
Medium Priority
Last Modified: 2012-05-04
I am primarilly a VB programmer.  However, I have a need to create a Shell Extension just like the "GAK" sample shell extension distributed by Microsoft.

If is use the DLL supplied with the sample it works fine.

I have VC 5.0 (DevStudio).  The sample does is, I guess to old, to be supplied with a "Workspace" for VC5.  I've tried a number of times to load this sample into VC5 and build the DLL.  The DLL I create will not work.

Can anyone help me to build a DLL from this sample that will work?

Question by:MarkO
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
LVL 10

Expert Comment

ID: 1184249
Will not work?  Do you mean will not compile? will not link? does not work correctly after compiling/linking?

Has the extension been installed/registered correctly?  Because, if not, then it will never get to run.

Also, ensure you have set the warning level to the highest (4) for the compiler (just in case).


Author Comment

ID: 1184250
Does not work after compiling/linking.  I create the DLL, and register it (just as I did the sample DLL).

Also, I realize that the GUID's have to be correct when registering the Shell Extension.  I've done everything I know to ensure this.  I beleive I got that all correct.  

Author Comment

ID: 1184251
Adjusted points to 40
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 1184252
If you run your program in Debug mode, is there any error or warning message shown?

Did you use implicit link or explicit link?

Author Comment

ID: 1184253
Status report: O.K. Starting over.  
1 - I've tried to create a workspace and load all of the files. OK so far, I thing.

2 - Build the DLL.  the following errors.  Now I'm not a VC programmer.  (I'm a VB guru) Where do I start????

--------------------Configuration: ShellExt - Win32 Debug--------------------
Propshet.obj : error LNK2001: unresolved external symbol __imp__DestroyPropertySheetPage@4
Propshet.obj : error LNK2001: unresolved external symbol __imp__CreatePropertySheetPageA@4
Debug/ShellExt.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
Creating browse info file...

ShellExt.dll - 3 error(s), 0 warning(s)

LVL 10

Expert Comment

ID: 1184254
Ah .. so the problem is that it does not link --- you'd told us before that it compiled and linked ok and didn't work.  This is different.

Looks like it is not finding a required external symbol (:-) .. where aer DestroyPropertySheetPage and CreatePropertySheetPage defined?  Have you got an import library for these included in your project?
LVL 10

Expert Comment

ID: 1184255
I just built it ok .. needed to add
to the list of library modules in the link settings for your project


Author Comment

ID: 1184256
Not really different. I'm just starting over.  On my first attempts I got these same errors.  I removed the portions of the sample related to the property page extension.  This is when it compiled/linked fine.  So now I'm just starting over from the beginning, thinking that this might have somthing to do with the problem.

Question was: Have you got an import library for these included in your project?
Answer: This is where I get lost.
Would I be looking for somthing like this

#ifndef _PRSHT_H_
#define _PRSHT_H_

// Define API decoration for direct importing of DLL references.
#if !defined(_COMCTL32_) && defined(_WIN32)


Author Comment

ID: 1184257
Yes, this allowed me to compile without removing the Property page stuff.

Now for the original problem.  This DLL will not work.  The sample DLL works fine.  When I replace it with the one I created it stops working.

LVL 10

Expert Comment

ID: 1184258
I built it an it all works fine .. do you want me to send you my project etc?


Author Comment

ID: 1184259
If you built one that actually works that would be great if you could send it to me.  (zipped would be fine)

Email it to me at   marko@ipass.net    and I'll see if I can get it to work.

Then post another answer for me to close this question.

LVL 10

Accepted Solution

RONSLOW earned 80 total points
ID: 1184260
Sorry for the delay

I built it and installed the REG file and copied the shellext.dll from the release area to C:\Windows\System and it worked.  TO make sure, I changed the icons a bit (put some pretty pink in them) so that I knew it was my shellext.dll and not the pre-built one.

I will a zip of the project to marko@ipass.net now


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question