Re: SHCreateDirectory not found
Please, provide the exact error message together with the error code, as well as some info about your system, like Windows OS, VS OS
Re: SHCreateDirectory not found
Well excluding "format.h", those headers compile fine for me with VS2022.
But without seeing the code that gives the compiler errors...
This test code compiles OK with the given header:
Code:
int main() {
HWND hwnd {};
SHCreateDirectory(hwnd, L"path");
}
Note that the 2nd param is of type PCWSTR ie a wide (unicode) string and not an ASCII one.
Re: SHCreateDirectory not found
Quote:
Originally Posted by
VictorN
Please, provide the exact error message together with the error code, as well as some info about your system, like Windows OS, VS OS
i already share the exact code
Re: SHCreateDirectory not found
Quote:
Originally Posted by
existenceproduct
i already share the exact code
You didn't.
You only posted the #includes with #pragmas and meaningless description.
So no code, no exact error message. :cool:
Re: SHCreateDirectory not found
... nor have you said whether my suggestion in post #17 re requiring a unicode string parameter rather than ASCII was right or not.
Re: SHCreateDirectory not found
Quote:
Originally Posted by
existenceproduct
I am getting this dmvfoam error when I compile my code.
I had already included the function SHGetFolderPath
sucessfully, but when I added SHCreateDirectory(NULL, p_path)
it stopped compiling. I have the following headers
#include <windows.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include "Format.h"
#include <wchar.h>
#include <stdio.h>
#include <shlwapi.h> // for SHGetFolderPath function
#include <shlobj.h> // for SHGetFolderPath and SHCreateDirectory function
//*************************************************************************************************************************
#pragma comment(lib, "shlwapi")
#pragma comment(lib, "shell32")
Any suggestions?
no solution to this
Re: SHCreateDirectory not found
Quote:
Originally Posted by
existenceproduct
no solution to this
There is nothing to solve, since we don't see the code casing the error, nor have we any info about what the error was.
Re: SHCreateDirectory not found
and also you haven't said whether my suggestion in previous posts has been tried and worked or not. But without having compilable code that demonstrates the problem, like Victor there's not much else we can do