Jump to content


Photo

REG WRITE STRING DLL


  • This topic is locked This topic is locked
3 replies to this topic

#1 gameside

gameside

    GMC Member

  • GMC Member
  • 123 posts

Posted 19 February 2012 - 02:04 PM

Hi there!
i made a DLL using pure basic which Write String value in registry it has 4 arguments
argument0[HKey],argument1[Subkey],argument2[String],argument3[Value]
but the problem is when i run the game nothing happening i checked registry editor no value was written in registry. :wacko:

here is my the Pure basic source
;-========= Write String to Registry ============
ProcedureDLL RegWriteString(HKMain,HKSub$,HKEntry$,HKValue.s) 
If RegCreateKeyEx_(HKMain, HKSub$, 0, 0, #REG_OPTION_NON_VOLATILE, #KEY_ALL_ACCESS, 0, @NewKey, @KeyInfo)= #ERROR_SUCCESS
  RegSetValueEx_(NewKey, HKEntry$, 0, #REG_SZ, @HKValue,256)
  RegCloseKey_(NewKey)
EndIf
EndProcedure

and this is DLL define in game maker
:GM070:
global.myfunction=external_define("test.dll","RegWriteString", dll_stdcall, ty_string, 4, ty_string ,ty_string,ty_string,ty_string)
external_call(global.myfunction,argument0,argument1,argument2,argument3)

and in create event
:GM123:
//Creat event
scr_dll("#HKEY_CURRENT_USER","Software\app1\Data1","Data0000","test")

i dont know what i did wrong with the code, :confused: please help me can some one make it correct i am really serous. :wallbash:

Edited by gameside, 19 February 2012 - 02:08 PM.

  • 0

#2 iam1me

iam1me

    GMC Member

  • GMC Member
  • 380 posts
  • Version:GM8

Posted 19 February 2012 - 05:10 PM

Your not suppose to talk about messing with the registry in this forum (I don't think any of the forums allow it actually)
  • 0
GUI API V1.0 is now here! http://gmc.yoyogames...0

Advanced Event Handling, Dynamic Interfaces, & Code Organization you can't get anywhere else using GML.

From a review by Creative Fusion:

It is extremely rare for me to comment, but all programmers that want to learn how to write professional code and everyone that wants a professional, easy-to-use, flexible, and FAST gui/hud/inventory/etc. system should support this project's development. I have been employed as a programmer (C++/CLI, C#, VisualBasic.NET, JavaScript, etc.) and know what companies look for and use, and I want to let people here know that they are using gui frameworks similar to what iam1me is providing here (if only gml were more object-oriented). For those that don't understand the current and massive potential benefits, I will try to help explain...


#3 gameside

gameside

    GMC Member

  • GMC Member
  • 123 posts

Posted 20 February 2012 - 04:29 AM

Your not suppose to talk about messing with the registry in this forum (I don't think any of the forums allow it actually)


thanks iam1me i knew that registry is not allowed in this form. :sad: but i am learning purebasic to build dll for game maker and this is a problem that i face i just want some one help me to make correct my code,please help me!!!! :confused:
  • 0

#4 ugriffin

ugriffin

    Idiot

  • Global Moderators
  • 1587 posts
  • Version:Mac

Posted 20 February 2012 - 07:35 AM

The topic is about modifying the registry. Plus these are the Game Maker forums, not the purebasic forums.

Topic locked.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users