diff --git a/BlitzPointer.cpp b/BlitzPointer.cpp
index ea935c9..7aef3d4 100644
--- a/BlitzPointer.cpp
+++ b/BlitzPointer.cpp
@@ -83,30 +83,102 @@ DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointerType(int32_t pVariable) {
DLL_METHOD int32_t DLL_CALL BP_CallFunction0(BP_BlitzFunction0_t lpFunctionPointer) {
#pragma comment(linker, "/EXPORT:BP_CallFunction0=_BP_CallFunction0@4")
- return lpFunctionPointer();
+ int32_t returnValue, StackPointer;
+
+ __asm { // Store Stack Pointer
+ mov StackPointer, esp;
+ }
+
+ returnValue = lpFunctionPointer();
+
+ __asm { // Restore Stack Pointer
+ mov esp, StackPointer;
+ }
+
+ return returnValue;
}
DLL_METHOD int32_t DLL_CALL BP_CallFunction1(BP_BlitzFunction1_t lpFunctionPointer, int32_t p1) {
#pragma comment(linker, "/EXPORT:BP_CallFunction1=_BP_CallFunction1@8")
- return lpFunctionPointer(p1);
+ int32_t returnValue, StackPointer;
+
+ __asm { // Store Stack Pointer
+ mov StackPointer, esp;
+ }
+
+ returnValue = lpFunctionPointer(p1);
+
+ __asm { // Restore Stack Pointer
+ mov esp, StackPointer;
+ }
+
+ return returnValue;
}
DLL_METHOD int32_t DLL_CALL BP_CallFunction2(BP_BlitzFunction2_t lpFunctionPointer, int32_t p1, int32_t p2) {
#pragma comment(linker, "/EXPORT:BP_CallFunction2=_BP_CallFunction2@12")
- return lpFunctionPointer(p1, p2);
+ int32_t returnValue, StackPointer;
+
+ __asm { // Store Stack Pointer
+ mov StackPointer, esp;
+ }
+
+ returnValue = lpFunctionPointer(p1, p2);
+
+ __asm { // Restore Stack Pointer
+ mov esp, StackPointer;
+ }
+
+ return returnValue;
}
DLL_METHOD int32_t DLL_CALL BP_CallFunction3(BP_BlitzFunction3_t lpFunctionPointer, int32_t p1, int32_t p2, int32_t p3) {
#pragma comment(linker, "/EXPORT:BP_CallFunction3=_BP_CallFunction3@16")
- return lpFunctionPointer(p1, p2, p3);
+ int32_t returnValue, StackPointer;
+
+ __asm { // Store Stack Pointer
+ mov StackPointer, esp;
+ }
+
+ returnValue = lpFunctionPointer(p1, p2, p3);
+
+ __asm { // Restore Stack Pointer
+ mov esp, StackPointer;
+ }
+
+ return returnValue;
}
DLL_METHOD int32_t DLL_CALL BP_CallFunction4(BP_BlitzFunction4_t lpFunctionPointer, int32_t p1, int32_t p2, int32_t p3, int32_t p4) {
#pragma comment(linker, "/EXPORT:BP_CallFunction4=_BP_CallFunction4@20")
- return lpFunctionPointer(p1, p2, p3, p4);
+ int32_t returnValue, StackPointer;
+
+ __asm { // Store Stack Pointer
+ mov StackPointer, esp;
+ }
+
+ returnValue = lpFunctionPointer(p1, p2, p3, p4);
+
+ __asm { // Restore Stack Pointer
+ mov esp, StackPointer;
+ }
+
+ return returnValue;
}
DLL_METHOD int32_t DLL_CALL BP_CallFunction5(BP_BlitzFunction5_t lpFunctionPointer, int32_t p1, int32_t p2, int32_t p3, int32_t p4, int32_t p5) {
#pragma comment(linker, "/EXPORT:BP_CallFunction5=_BP_CallFunction5@24")
- return lpFunctionPointer(p1, p2, p3, p4, p5);
+ int32_t returnValue, StackPointer;
+
+ __asm { // Store Stack Pointer
+ mov StackPointer, esp;
+ }
+
+ returnValue = lpFunctionPointer(p1, p2, p3, p4, p5);
+
+ __asm { // Restore Stack Pointer
+ mov esp, StackPointer;
+ }
+
+ return returnValue;
}
\ No newline at end of file
diff --git a/BlitzPointer.vcxproj b/BlitzPointer.vcxproj
index 7208ad6..186338e 100644
--- a/BlitzPointer.vcxproj
+++ b/BlitzPointer.vcxproj
@@ -43,13 +43,12 @@
$(SolutionDir)#Build\$(ProjectName)\$(Configuration)\
$(SolutionDir)#Intermediate\$(ProjectName)\$(Configuration)\
.dll
- true
$(SolutionDir)#Build\$(ProjectName)\$(Configuration)\
$(SolutionDir)#Intermediate\$(ProjectName)\$(Configuration)\
.dll
- false
+ true
@@ -82,20 +81,25 @@
true
true
%(PreprocessorDefinitions)
- EditAndContinue
+ ProgramDatabase
+ false
+ true
- true
- 1.0
+ Debug
Enabled
false
false
+ false
+ false
+
+
+ false
+ true
-
- false
-
+
@@ -113,7 +117,7 @@
4Bytes
true
false
- false
+ true
false
@@ -128,21 +132,24 @@
true
%(PreprocessorDefinitions)
None
+ false
+ true
- false
+ No
false
-
-
- 1.0
+ false
Enabled
false
+ false
+
+
+ false
+ false
-
- false
-
+
@@ -153,71 +160,12 @@
-
-
- BlitzPointer.LICENSE
- PreserveNewest
-
-
- BlitzPointer.LICENSE.lesser
- PreserveNewest
-
-
- BlitzPointer.decls
- PreserveNewest
- true
-
-
- Examples\BlitzPointer.ipf
- PreserveNewest
- true
-
-
- Examples\Example_Shared.bb
- PreserveNewest
- true
-
-
- Examples\Example01.bb
- PreserveNewest
- true
-
-
- Examples\Example02.bb
- PreserveNewest
- true
-
-
- Examples\Example03.bb
- PreserveNewest
- true
-
-
- Examples\Example04.bb
- PreserveNewest
- true
-
-
- Examples\Example05.bb
- PreserveNewest
- true
-
-
- Examples\Example06.bb
- PreserveNewest
- true
-
-
- Examples\Example07.bb
- PreserveNewest
- true
-
-
- Examples\Example08.bb
- PreserveNewest
- true
-
-
+
+
+
+
+
+
diff --git a/BlitzPointer.vcxproj.filters b/BlitzPointer.vcxproj.filters
index 8ecdabf..70a5859 100644
--- a/BlitzPointer.vcxproj.filters
+++ b/BlitzPointer.vcxproj.filters
@@ -5,22 +5,10 @@
{4FC737F1-C7A5-4376-A066-2A32D752A2FF}
cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-
- {53eae672-7e3f-4de4-af1f-79e46e407a39}
- false
- bb;decls;ipf
-
{527b3491-2ee2-474d-863f-2d21b7abb958}
h;hh;hpp;hxx;hm;inl;inc;xsd
-
- {df5bf7dd-7995-49a8-b534-f2c83a65ad87}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
- {2045f2b8-f3b8-4e65-80eb-459d4e00cd5a}
-
@@ -41,45 +29,4 @@
Header Files
-
-
- Resource Files
-
-
- Resource Files
-
-
- Blitz Files
-
-
- Blitz Files\Examples
-
-
- Blitz Files\Examples
-
-
- Blitz Files\Examples
-
-
- Blitz Files\Examples
-
-
- Blitz Files\Examples
-
-
- Blitz Files\Examples
-
-
- Blitz Files\Examples
-
-
- Blitz Files\Examples
-
-
- Blitz Files\Examples
-
-
- Blitz Files\Examples
-
-
\ No newline at end of file
diff --git a/BlitzPointer.decls b/Resources/BlitzPointer.decls
similarity index 100%
rename from BlitzPointer.decls
rename to Resources/BlitzPointer.decls
diff --git a/Examples/BlitzPointer.ipf b/Resources/Examples/BlitzPointer.ipf
similarity index 100%
rename from Examples/BlitzPointer.ipf
rename to Resources/Examples/BlitzPointer.ipf
diff --git a/Examples/Example01.bb b/Resources/Examples/Example01.bb
similarity index 100%
rename from Examples/Example01.bb
rename to Resources/Examples/Example01.bb
diff --git a/Examples/Example02.bb b/Resources/Examples/Example02.bb
similarity index 100%
rename from Examples/Example02.bb
rename to Resources/Examples/Example02.bb
diff --git a/Examples/Example03.bb b/Resources/Examples/Example03.bb
similarity index 100%
rename from Examples/Example03.bb
rename to Resources/Examples/Example03.bb
diff --git a/Examples/Example04.bb b/Resources/Examples/Example04.bb
similarity index 100%
rename from Examples/Example04.bb
rename to Resources/Examples/Example04.bb
diff --git a/Examples/Example05.bb b/Resources/Examples/Example05.bb
similarity index 100%
rename from Examples/Example05.bb
rename to Resources/Examples/Example05.bb
diff --git a/Examples/Example06.bb b/Resources/Examples/Example06.bb
similarity index 100%
rename from Examples/Example06.bb
rename to Resources/Examples/Example06.bb
diff --git a/Examples/Example07.bb b/Resources/Examples/Example07.bb
similarity index 100%
rename from Examples/Example07.bb
rename to Resources/Examples/Example07.bb
diff --git a/Examples/Example08.bb b/Resources/Examples/Example08.bb
similarity index 100%
rename from Examples/Example08.bb
rename to Resources/Examples/Example08.bb
diff --git a/Examples/Example_Shared.bb b/Resources/Examples/Example_Shared.bb
similarity index 100%
rename from Examples/Example_Shared.bb
rename to Resources/Examples/Example_Shared.bb
diff --git a/LICENSE b/Resources/LICENSE
similarity index 100%
rename from LICENSE
rename to Resources/LICENSE
diff --git a/LICENSE.lesser b/Resources/LICENSE.lesser
similarity index 100%
rename from LICENSE.lesser
rename to Resources/LICENSE.lesser