Help with the "GAK" sample shell extension

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?

Thanks
MarkOAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RONSLOWCommented:
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).

0
MarkOAuthor Commented:
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.  
0
MarkOAuthor Commented:
Adjusted points to 40
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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

Did you use implicit link or explicit link?
0
MarkOAuthor Commented:
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????

Errors:
--------------------Configuration: ShellExt - Win32 Debug--------------------
Compiling...
Propshet.cpp
Linking...
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)

0
RONSLOWCommented:
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?
0
RONSLOWCommented:
I just built it ok .. needed to add
  comctl32.lib
to the list of library modules in the link settings for your project

0
MarkOAuthor Commented:
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.
//
#ifndef WINCOMMCTRLAPI
#if !defined(_COMCTL32_) && defined(_WIN32)
#define WINCOMMCTRLAPI DECLSPEC_IMPORT
#else
#define WINCOMMCTRLAPI
#endif
#endif // WINCOMMCTRLAPI

0
MarkOAuthor Commented:
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.

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

0
MarkOAuthor Commented:
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.

Thanks
0
RONSLOWCommented:
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

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.