Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (dr_panther, Quad, AndrewAMD, 7th_zorro), 945 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
DLL Question #411291
11/15/12 10:49
11/15/12 10:49
Joined: Nov 2009
Posts: 201
Logitek Offline OP
Member
Logitek  Offline OP
Member

Joined: Nov 2009
Posts: 201
Hello,

I don't know if this is the right place.
But I will ask.

I have tried to compile a DLL with this source: It should only read the documents path.

Code:
#define WIN32_LEAN_AND_MEAN		
#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	
#include "adll.h"	


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;
}



I have tried to compile this with the codeblocks 3dgs plugin wizard and the Codeblocks Version 10.05 GNU CC Compiler

But I get always error messages.

Like:

SHGetSpecialFolderPathA(NULL,path,CSIDL_MYDOCUMENTS,0); was not declared in the scope

and also CSIDL_MYDOCUMENTS
was not declared in the scope.

Is there anyone that can compile this short script to a dll with A7? Or what is wrong?

Maybe you can help me.

Beside: I know the folderpath.dll but I only need the mydocuments folder and I use C-Script. So I would need this short dll.

Re: DLL Question [Re: Logitek] #411292
11/15/12 11:04
11/15/12 11:04
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I am not familiar with Codeblocks. We're using VC++, so I can help you when you compile your DLL with that compiler. But maybe other users have experience with Codeblocks?

Re: DLL Question [Re: jcl] #411296
11/15/12 11:28
11/15/12 11:28
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
i think u need to add lib to your project

Re: DLL Question [Re: Dico] #411298
11/15/12 11:48
11/15/12 11:48
Joined: Nov 2009
Posts: 201
Logitek Offline OP
Member
Logitek  Offline OP
Member

Joined: Nov 2009
Posts: 201
And how should I do this? I have also no experience with Codeblocks.

Re: DLL Question [Re: Logitek] #411299
11/15/12 11:58
11/15/12 11:58
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
click right on your project ---> Build Option ---> Linker Setting ---> Add

Re: DLL Question [Re: Dico] #411301
11/15/12 12:11
11/15/12 12:11
Joined: Nov 2009
Posts: 201
Logitek Offline OP
Member
Logitek  Offline OP
Member

Joined: Nov 2009
Posts: 201
I got the same error messages:

SHGetSpecialFolderPathA(NULL,path,CSIDL_MYDOCUMENTS,0); was not declared in the scope

and also CSIDL_MYDOCUMENTS was not declared in the scope.

Re: DLL Question [Re: Dico] #411302
11/15/12 12:13
11/15/12 12:13
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
Quote:

And how should I do this? I have also no experience with Codeblocks.


Why don't you use Visual Studio then laugh ? This way you will have more help. I have also tested codeblocks but I prefer Visual Studio for plugin development.

Re: DLL Question [Re: 3dgs_snake] #411303
11/15/12 12:17
11/15/12 12:17
Joined: Nov 2009
Posts: 201
Logitek Offline OP
Member
Logitek  Offline OP
Member

Joined: Nov 2009
Posts: 201
I have also Visual C++ 2010 Express. But never used.

Re: DLL Question [Re: Logitek] #411307
11/15/12 13:19
11/15/12 13:19
Joined: Nov 2009
Posts: 201
Logitek Offline OP
Member
Logitek  Offline OP
Member

Joined: Nov 2009
Posts: 201
Hey, I have used now Visual C++ and everything is working fine.
laugh

One question:

Is such a dll also compatible with windows xp, vista and 7 or will there maybe a problem?

Re: DLL Question [Re: Logitek] #411308
11/15/12 13:47
11/15/12 13:47
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
first important thing: publish your dll with Release Build, not with Debug
second: yes it will be usable if you don't use "new" features and it's compiled with correct compiler settings (x86)


Visit my site: www.masterq32.de
Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1