1. dynamic code, change code in cs
How is this possible:
mov DWORD PTR CS:[@cleanstack+2],0
//.......
call [pMethodAddr]
@cleanstack:
add ESP, DWORD(1)
// this instruction can be changed
// by the stack-cleanup setup depending
// on CpuHelper.boCleanESP (for cdecl function)
for the moment i always get an AV at the mov
statement. I think i don't have the permission
from the os to write to the Codesegent at this
address. How can I change this?
TIA
Guenther
2. linking .cs form to .aspx form using C# - CSharp/C#
3. Newbie: Should code go in Form.cs or FormDesigner.cs?
There are situations where it appears code can go either in the form Designer's class or the form's class. Is there a best practice regarding where code should go? Does it matter? Here are some examples: 1) If I have multiple TreeViews on a single form (Form1) and I want to consolidate all the code necessary to build the various ImageLists. Should I put this code in Form1Designer.cs or Form1.cs? 2) If I have different non-visible components on a form (e.g. Timer, etc.) should the component initialization code go in the Designer or the form, or in the form itself - perhaps in the constructor or FormLoad event? 3) If I have multiple derived controls on a form, should the initialization code for these controls be in the parent form's Designer or in each derived control's class? When should code go in the Designer and when in the object's class? Are there advantages/disadvantages of each option? Thanks in advance.
4. Calling a C++ Form from a Delphi Form
5. Calling a C++ Form from a Delphi Form [solved]
Remy Lebeau (TeamB) wrote:
Thanks for the quick response.
> What is the exact linker error? You need to be more specific.
I needed extern "C" for the delphi side to see it. (solved).
>
>> TForm *GetTForm1() { if (Form1==0) Form1 = new TForm1(Form1);
>> return Form1;
I read that Delphi has everything by reference so it's changed to:
TForm & WINAPI _export GetTForm1() {
if (Form1==0) Application->CreateForm(__classid(TForm1), &Form1);
return *Form1;
}
}
>
> You are passing the NULLified Form1 pointer as the Owner of the TForm1
> instance you are trying to create for the Form1 pointer. If you don't want
> the new form to have an Owner, then specify NULL explicitally instead:
>
> TForm *GetTForm1()
> {
> if (Form1==NULL)
> Form1 = new TForm1(NULL);
> return Form1;
> }
Not the intent in this case, once the form is created it shouldn't go
away so it's owner should be the application. However this is good to
know anyways.
> Now, with that said - I would suggest moving the body of GetTForm() into the
> form's .cpp file instead of having it inlined in the header file:
OK, done.
new code is (inside unit1.cpp)
extern "C" {
TForm & WINAPI _export GetTForm1() {
if (Form1==0) Application->CreateForm(__classid(TForm1), &Form1);
return *Form1;
}
}
Thanks for your help!
6. How to rewrite in C++ Code from Delphi Code - Borland C++ Builder VCL Components
7. Taking a single large .cs file and making many smaller .cs files
"Greg Larsen" < XXXX@XXXXX.COM > ha scritto nel messaggio news:79450CE7-E6E2-43E8-8FD9- > If I'm building a class as ABC, and in contains a lot of methods, > eventually > my code file ABC.cs get extremely large, let say 3000+ lines of code. > What > are the best approaches to breaking up my large ABC.cs file into smaller > manageable chunks, so no code file is larger that say 200-300 lines of > code? best: Restructure the code and using more specific classes. worse: use the "partial" keyword.
8. Calling the function in one cs from another cs file - CSharp/C#