Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "Win32API.inc"
#Resource RcData, 9999, "test.dll" '<---- put name of source code file here
Global hDlg As Dword
%IDC_Button = 500
$MyDLL = "mygreatcode.dll"
Function PBMain() As Long
Dialog New Pixels, 0, "gbCodeInside - DLL Version",300,300,200,100, %WS_OverlappedWindow To hDlg
Control Add Button, hDlg, %IDC_Button,"Extract DLL", 40,30,125,25
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
If Cb.Msg = %WM_Command And Cb.Ctl = %IDC_Button And Cb.CtlMsg = %BN_Clicked Then ExtractDLL
End Function
Sub ExtractDLL
Local temp$
temp$ = Resource$(RcData,9999)
Open $MyDLL For Output As #1 '<--- will be where EXE is located
Print #1, temp$
Close #1
End Sub
'gbs_00739
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm