taultunleashed logoPlugin with code injection question : Developer's Corner
newtopic  postreply
 [ 6 posts ] 
blue large dot

Plugin with code injection question : Developer's Corner

Posted: April 14th, 2004, 5:04 am
 
drdeath
drdeath's Reps:
User avatar
I am writing a plugin that will be doing some code injection in order to stick some pointers to dynamic memory locs in a static location. I have this working outside of XUn in a seperate DLL and a sample VB app just fine but I now want to make it into a proper plugin.

I have the code injection happening in the Initialize section of the class at the moment but I was thinking if I port this to a plugin wont it be already running before the game is started that needs the code injected into it causing it to fail ?

Not to sure how best to handle this. Best I can think of atm is sticking a loop before the code injection that wait until the game window pops up or a timeout is reached.

Is there a better approach ?


Reply with quote
Posted: April 14th, 2004, 6:20 am
 
Admin
Admin's Reps:
User avatar
You can put a bDoSomething flag in your window_activate function, and call it only once when the user opens the plugin window for the first time.


Reply with quote
Posted: April 14th, 2004, 2:36 pm
 
drdeath
drdeath's Reps:
User avatar
OK got that going as suggested Admin. Works like a charm. However I got another question. I want to update a bunch of static text boxes. I thought that doing this on the OnPaint event would work but alas not, The update seems to paint the number to the screen OK but it then disappears, and it on;y updates if I move my cursor over the window. Makes sense i guess that the on paint is only called when the Plugin window is painted but why does it disappear ?

I guess the best solution would some kind of timer to update from. Any pointer on how i would do that in Xun ?

Also my plugin will have some public functions that you can call from the scripting plugin but how would you do that ? Normaly I would use Set X = CreateObject("BLAH") but since its a plugin its already created aint it ?


Reply with quote
Posted: April 14th, 2004, 2:48 pm
 
WyvernX
WyvernX's Reps:
User avatar
Quick question. Does your plugin use the xml code for viewing, or a vb interface using vb forms?


Reply with quote
Posted: April 14th, 2004, 2:49 pm
 
drdeath
drdeath's Reps:
User avatar
Is a VB6 project based off the VB Plugin example so it uses the xml files.

Since I dont really need a GUI atm since most of the stuff is really only usefull within a script. I will drop the gui stuff. Do I need to do anything else to a bog standard VB dll to make it a plugin like the SWG chatlogger ?


Reply with quote
Posted: April 22nd, 2004, 7:47 pm
 
SideReal
SideReal's Reps:
User avatar
DrDeath -

You can still do your GUI stuff, just do it on the ::Flip event, not the OnPaint event. You have to remember this is a gaming DirectX environment. The sequence of events is ::BeginScene, ::EndScene, ::Flip. Putting your 2d draw on the Flip ensures it won't get overwritten during the scene creation.


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 5 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of Developer's Corner RSS Feed 

SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?