|
Managed code is slower than native, but just for calling a function in a library, I don't think there should be any difference as such. Further more, if you are talking about the execution time of the function within the DLL, that should remain the same (within the DLL), no matter what environment are you executing it from.
I recommend that you do a little profiling and test it out. You don't need any setup as such. VS 2008 has profiling features inbuilt, or you could use a high resolution counter to find out how long has the function taken to execute from within the test environment (native or managed).
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I did get you.
Case 1: nothing to see here, normal case.
Case 2: even if the C++ application was still running, it has nothing to do with it. Nothing. Why did you even bring it up? Anyway, a call from C# to a native function requires marshaling of the arguments and the return value (if it returns), which is obviously slower than not marshaling. The amount of marshaling is (equally obviously) dependent on the number of arguments and their type (so for some types, also of their size)
edit: oh and IIRC the .NET runtime also does some safety checks with regards to the stack, but I don't know what it checks
|
|
|
|
|
The native DLL is compiled. In theory, the functions within it will have the same performance regardless of what program is calling it, be it C++, C#, VBA, etc.. The theory falls down once you look at the program in question as a whole. Due to paging, the memory cache, pipelining issues, how the call is made (i.e interop) and so forth, the actual performance in real world conditions may vary.
|
|
|
|
|
Hi all,
I m working on MFC applications,i have some things by which my application detect by antivirus.
List of actions are mention as follows that is detected by antivirus.
1. Key hook of keyboad.
2. Sending an email by my application.
3. Use Shell execute to run another application.
4. Command use to put an application in startUp.
...
please tell me how can i do all these work without detecting by antivirus.
Please help me for this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: I m working on MFC applications,i have some things by which my application detect by antivirus.
List of actions are mention as follows that is detected by antivirus.
1. Key hook of keyboad.
2. Sending an email by my application.
3. Use Shell execute to run another application.
4. Command use to put an application in startUp.
...
please tell me how can i do all these work without detecting by antivirus.
Most of my applications do all of these, most of the time, and none of them were detected as a virus by any AV program. What else is your program doing?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
On other application not detected by any AV.
one more thing that is i m not mentioned,If i m use same code in VB.net than also its detected by AV.
Suggest me some solution for VB.net also.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
A lot of anti-virus/spyware/malware suites will alert users when an application attempts items 1, 2 and 4 on your list IF the application is not digitally signed. Once the user gives that application permission to execute those tasks the AV software is unlikely to show the alert again unless the executable is changed.
Chances are your AV software is displaying an alert every time you recompile because the executable has changed.
|
|
|
|
|
How can i digitally signed my application.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
|
Please provide me any example for apply digital signature.
thanks.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Ummmmmmm you might want to try a different approach. I suggest giving Research 101[^] a try.
|
|
|
|
|
good day,
is it possible to display the values/result from the editbox to the listbox? by how?
m_list.???
|
|
|
|
|
CEdit::GetWindowText() and CListBox::AddString() should help you.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
what is the exact code to get the value of the editbox (variable type double) and displays in the listbox?
i tried : m_list.GetText(m_list.GetCurSel(), m_edit1) but after building committed errors...
please help.
|
|
|
|
|
Instead of having the variable type as double, I'll recommend that you have it as a control variable, and call m_Edit.GetWindowText() and then convert it to a number with _ttol() or _ttoi() , etc.,
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
can u please give me some sample code of it? i dont know how to use tt01() or ttoi?
please help...
|
|
|
|
|
thank you my code is runnig now i just change it to control and use getwindowtext.
thank you very much
neil
|
|
|
|
|
Hi all,
I know global variables are bad. I'm trying to write my first game. Its like tetris where you have different shapes. I have a linked list of shapes. Where am I supposed to declare this list in a Win32 app?
I thought the best place would be in the LRESULT CALLBACK WndProc under the switch(msg) case WM_CREATE. However, I'm getting some errors doing that (some error about the initialization being skipped by some case labels).
I cant declare the list in WinMain because I need to use it in LRESULT CALLBACK to modify its content...
Currently, I have my list declared as a global variable and it works well like that. I'm trying to understand what the alternative is (trying to develop good coding habits).
|
|
|
|
|
You can declare it in the WndProc function but outside the switch statement.
And you must declare the variable as static.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
vietnam09
Hi!
make OS
I not use MS-DOS
HDD have partitions:C:\,D:\,E:\
Question:How to :boot into partittion D:\ not Format all data(User select disk action boot as Win XP FAT 32)-NASM
kernel:
How to:FAT32 disk manager in my kernel
how to write PathCopy for boot.exe to CD-ROM as XP(not live CD,iso)
Please,full code not book,guide
THANKS
|
|
|
|
|
|
What do you mean by your question? please restate it.
|
|
|
|
|
frm:tuan1111
THANKS.
but I don't know,what is this ?
Please,better.
Answer Boot Question
By code
vietnam09
THANKS.
|
|
|
|
|
true
I want to write OS.
If I haven't MS-DOS then not use "int 21h"
How to create "int 21h"(not MS-DOS")
U have code:MS-DOS with TASM,Turbo C 3.0
-----------------------------------------------
NASM2 is free download
NASm2 != TASM ?NASM_begin.pdf where
VC6,gcc free
what is gcc ?It is DJGPP & 32 bit compiler.Link download .
If I write 32 bit boot with NASM2...how to mixing NASM with turbo C 3.0,gcc(32 bit kernel) ?
I want to:
in kernel.asm,mixing NASM with gcc|TC (32 bit)
in ker_mix.c,I write:
//descsript:create print Day Function
char input;
void main(){
cout << Action << endl;
cin >> input;
if(input=='Day'){
;print now date,month,time
}
then mix .c(32 bit) with kernel.asm
How to do it
-----------------------------------------------------
End,I have VGA-screen: 16M memory.
It view *.mp4,bitmap file(> 256 color) & run screensaver 3d.All color normal...beatiful
But I write VGA_Bitmap.c with TC 3.0 then result display bitmap bad
why ?
sReason:menory 16M or........
who edit VGA_bitmap.c(gcc)->Result:beautiful color,normal
THANKS
vietnam09
BY:TUAN1111--
|
|
|
|
|