Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » [SOLVED]Sharing Ptr of object to dll
[SOLVED]Sharing Ptr of object to dll [message #52172] Thu, 01 August 2019 15:09 Go to previous message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
Hello community,

I have a programm wich load a dll. This dll carry class wich have a public attribut "object* object;"
this public attribut is fill by my main programm like that: ptrToTheClass->object = myMainObjectPtr;

then when I use method of my dll wich use the objectDll ptr it crash.
However my objectDll Ptr have the right address of the main object so I dont get why it crash.
(I have checked by using log and the problem occur when I call method of ptrToTheClass->object)

Someone have an idea ? maybe I can't share object between my Dll instance of object and my programm ?

here I show you :
Method of my dll:
void Discord_Minecraft::launchCommande(ValueMap payload){
	ptrBot->CreateMessage(ChannelLastMessage, "SmartUppBot DLL hot LOAD !"); //the crash occur here (the ptrBot addr is right)
}


here is creation of Discord_Minecraft object and filling of ptrBot :
			
DiscordModule* test = facto(); //Test is my Discord_Minecraft DLL object
test->ptrBot = getBotPtr(); // here I fill ptrBot 


Thanks in advance.
Best Regard.

[Updated on: Wed, 07 August 2019 09:53]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Map implementation
Next Topic: What is the minimum OpenGL version required for GLCtrl?
Goto Forum:
  


Current Time: Fri Mar 29 09:48:41 CET 2024

Total time taken to generate the page: 0.01279 seconds