Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7882871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:23:15+00:00 2026-06-03T04:23:15+00:00

I’ve successfully powered my way through the WDK XPSDrv sample project and modified it

  • 0

I’ve successfully powered my way through the WDK XPSDrv sample project and modified it to do what I need. However, I absolutely cannot figure out how to get the build scripts to reference/include/whatever shell32.lib. I’m a .NET guy! This is strange and terrifying territory.

I think adding a dependency reference is what I need to do. When I compile I get this error

3>errors in directory c:\winddk\7600.16385.1\src\printgit\xpsdrvsmpl\
src\filters\common
3>c:\winddk\7600.16385.1\src\printgit\xpsdrvsmpl\src\filters\common\
xdstrmflt.cpp(238) : error C3861: 'ShellExecute': identifier not found

Due to my extreme lack of knowledge (and hurry) I’m not using visual studio, just simple mods in notepad++ and the shell wdk build environment. I have a surrogate project in VS where I’ve been writing and testing small chunks of code. In that project I added a Dependency library to shell32.lib and everything worked perfectly.

There’s a makefile that references a sources, the contents are below.

Not that it matters, but the code that requires shell32 is

HINSTANCE statu = ShellExecute(NULL,TEXT("open"),szTempFileName,NULL,NULL,9);

Here’s the sources file.

INCLUDES=$(INCLUDES);        \
    .\;                      \
    .\..\inc;                \
    .\..\debug;              \
    $(DDK_INC_PATH);         \
    $(SDK_INC_PATH)\gdiplus; \

USE_ATL=1
USE_STL=1

ATL_VER=70
STL_VER=70

# We use STL 7.0, which is not available pre-Vista. We therefore set USE_LIBCMT=1
# If STL 7.0 is not necessary, USE_MSVCRT=1 is recommended
USE_LIBCMT=1

USE_IDLBASED_DLLDATA=1
USE_OBJECT_ROOT=1

MSC_WARNING_LEVEL=/W4 /WX

USE_NATIVE_EH=1

PRECOMPILED_CXX=1
PRECOMPILED_INCLUDE=precomp.h

# To remove debug code remove -DDBG from the line below
C_DEFINES=$(C_DEFINES) -D_UNICODE -DUNICODE

SOURCES=\
    bkpchndlr.cpp       \
    bkpthndlr.cpp       \
    bkschema.cpp        \
    cmpthndlr.cpp       \
    cmprofpthndlr.cpp   \
    cmprofpchndlr.cpp   \
    cmintpthndlr.cpp    \
    cmschema.cpp        \
    cmprofileschema.cpp \
    cmintentsschema.cpp \
    globals.cpp         \
    nupschema.cpp       \
    nupchndlr.cpp       \
    nupthndlr.cpp       \
    pchndlr.cpp         \
    pgscpchndlr.cpp     \
    pgscpthndlr.cpp     \
    pgscschema.cpp      \
    porientpthndlr.cpp  \
    porientschema.cpp   \
    psizepthndlr.cpp    \
    psizeschema.cpp     \
    pimagepthndlr.cpp   \
    pimageschema.cpp    \
    pshndlr.cpp         \
    pthndlr.cpp         \
    ptquerybld.cpp      \
    schema.cpp          \
    wmpchndlr.cpp       \
    wmpthndlr.cpp       \
    wmschema.cpp        \
    workbuff.cpp

TARGETNAME=xdsmplcmn
TARGETTYPE=LIBRARY
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:23:17+00:00Added an answer on June 3, 2026 at 4:23 am

    For example in your sources file:

    TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib $(SDK_LIB_PATH)\user32.lib $(SDK_LIB_PATH)\shell32.lib
    

    … amend as needed 😉

    However, your error is actually not a linker error but a compiler error, so you’ll likely want to include the header that declares ShellExecute, which is shellapi.h, in some way.


    Just looked the sample up in my WDK (7600.16385.1) and as a matter of fact you removed the very important part reproduced below, to which you just would have to append the other .lib files to link against:

    TARGETLIBS=                                  \
        $(SDK_LIB_PATH)\kernel32.lib             \
        $(SDK_LIB_PATH)\user32.lib               \
        $(SDK_LIB_PATH)\winspool.lib             \
        $(SDK_LIB_PATH)\ole32.lib                \
        $(SDK_LIB_PATH)\oleaut32.lib             \
        $(SDK_LIB_PATH)\advapi32.lib             \
        $(SDK_LIB_PATH)\msxml6.lib               \
        $(SDK_LIB_PATH)\uuid.lib                 \
        $(SDK_LIB_PATH)\Comdlg32.lib             \
        $(OBJ_PATH)\..\debug\$O\xdsdbg.lib \
        $(OBJ_PATH)\..\common\$O\xdsmplcmn.lib \
    

    … apologies, there are plenty of sources files as part of this sample, so of course I cannot really know which of the samples you modified and are trying to build 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Seemingly simple, but I cannot find anything relevant on the web. What is the
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.