Solved

Help with the "GAK" sample shell extension

Posted on 1998-04-13
12
436 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
C++ BOOL WINAPI ReadFile fails on windows 10 when reading from USB cable 9 474
computer science syllabus 3 89
max float value 3 51
Android development question 2 54
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

831 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