|
1 registered members (Grant),
999
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Get MyDocuments path?
[Re: oliver2s]
#265867
05/14/09 17:44
05/14/09 17:44
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: Get MyDocuments path?
[Re: WretchedSid]
#265870
05/14/09 18:02
05/14/09 18:02
|
Joined: Oct 2007
Posts: 5,209 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
|
@sylar the link is the one for windows mobile  normal version: http://msdn.microsoft.com/en-us/library/bb762204(VS.85).aspx csidl list: http://msdn.microsoft.com/en-us/library/bb762494(VS.85).aspx here is a quick and dirty dll that gets documents paths: http://www.quadraxas.com/out/documents_path_dll.rardll source:
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <shlobj.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <math.h.>
// engine specific header file
#define DLL_USE // always define before including adll.h
#include "adll.h"
///////////////////////////////////////////////////////////////////////
// the following function MUST be defined in your DLL
// DLL main entry point - normally this needs not to be changed
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved )
{
// make sure the library is linked
engine_bind();
return TRUE;
}
char path[MAX_PATH];
DLLFUNC char* getDocumentsPath(){
SHGetSpecialFolderPathA(NULL,path,CSIDL_MYDOCUMENTS,0);
return path;
}
updated: it was getting allusers/documents, now it returns teh path of user's my documents folder
Last edited by Quadraxas; 05/14/09 18:13.
3333333333
|
|
|
Re: Get MyDocuments path?
[Re: oliver2s]
#265882
05/14/09 20:01
05/14/09 20:01
|
Joined: Oct 2007
Posts: 5,209 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
|
strange it runs just fine on me, can ayone else try it? also are you using 7.77, and you are not seeing this right? you may also try defining a PRAGMA_PLUGIN
Last edited by Quadraxas; 05/14/09 20:11.
3333333333
|
|
|
|