Solved

Help with the "GAK" sample shell extension

Posted on 1998-04-13
12
428 Views
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?

Thanks
0
Comment
Question by:MarkO
  • 6
  • 5
12 Comments
 
LVL 10

Expert Comment

by:RONSLOW
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).

0
 

Author Comment

by:MarkO
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.  
0
 

Author Comment

by:MarkO
ID: 1184251
Adjusted points to 40
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

Expert Comment

by:jann
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?
0
 

Author Comment

by:MarkO
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????

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
 
LVL 10

Expert Comment

by:RONSLOW
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?
0
 
LVL 10

Expert Comment

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

0
 

Author Comment

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

0
 

Author Comment

by:MarkO
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.

0
 
LVL 10

Expert Comment

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

0
 

Author Comment

by:MarkO
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.

Thanks
0
 
LVL 10

Accepted Solution

by:
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 marko@ipass.net now

0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

803 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