Help with the "GAK" sample shell extension

Posted on 1998-04-13
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
  • 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

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?
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

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    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 40 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 now


Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
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.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now