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.
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
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
//Creat event
scr_dll("#HKEY_CURRENT_USER","Software\
app1\Data1","Data0000","test"
)
i don't know what i did wrong with the code,
actually i posted this topic in game maker community but some one answered me that registry is not allowed in forum so they locked my topic. so i post it here may be some one can help me




