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

  • Home
  • SEARCH
  • 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 8874695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:47:13+00:00 2026-06-14T18:47:13+00:00

Using LPTSTR strDLLPath1 = new TCHAR[_MAX_PATH]; ::GetModuleFileName((HINSTANCE)&__ImageBase, strDLLPath1, _MAX_PATH); I get path to my

  • 0

Using

LPTSTR  strDLLPath1 = new TCHAR[_MAX_PATH];
::GetModuleFileName((HINSTANCE)&__ImageBase, strDLLPath1, _MAX_PATH);

I get path to my DLL which it correctly prints.

D:\Test\work\EasyDLL\Debug\EasyDLL.dll

Now I just need the "D:\Test\work\EasyDLL\Debug\".

Given my experience using VC++ can you guide me in best way to do that – any string replace, conversion etc.

  • 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-14T18:47:15+00:00Added an answer on June 14, 2026 at 6:47 pm

    Look at shell patch handling functions, and more precisely at PathRemoveFileSpec, which does exactly what you want.

    You will need to link with shlwapi.lib.

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

Sidebar

Related Questions

Declare: LPWSTR** lines= new LPWSTR*[totalLines]; then i set using: lines[totalLines]=&totalText; SetWindowText(totalChat,(LPWSTR)lines[totalLines]); totalLines++; Now I
Im using: bool GetOS(LPTSTR pszOS) { OSVERSIONINFOEX osve; BOOL bOsVersionInfoEx; ZeroMemory(&osve, sizeof(OSVERSIONINFOEX)); osve.dwOSVersionInfoSize =
I am using the following function ..instead of CFolderDialog.. to get the folder path...check
I am using the following code: CAtlNavigateData navData; CStringA m_strForm = name=+++&priv=1&password=; navData.SetPostData((BYTE*)(LPSTR)(LPCSTR)m_strForm, m_strForm.GetLength(),
I am using this code to get the windows version: #define BUFSIZE 256 bool
I am using Qt on windows platform. i want to get and display vendor
I am using MinGW which does not have full functionality. eg. It has no
I am using C++ with the win32 Api and I want to get the
I can access a method from a C++ Dll using C# using this method
Followed MSDN's GetOpenFileName example using the FFI of LuaJIT. I've been trying to get

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.