|
thanks... ill try to use this... i hope i can.. hehe..
|
|
|
|
|
Hi, I am building a Testing tool using C++.net for college. I need to
get a very accurate measurement of a c functions execution time.
Currently I am running the function as real-time process and using the
QueryPerformanceCounter to measure its time, however this is still not
very accurate (between 1 and 5% inaccuracy). Any ideas on how to
improve this would be much appreciated.
|
|
|
|
|
I was recently messing around with this approach, and I found the results to be unverifiable. I was using the high fidelity system time stamp retrieved from a CounterSample (I suspect that you did something similar). The MSDN documentation states that the timestamp has an accuracy of a tenth of a millesecond.
I found this article over in the MSDN Magazine archives, maybe it will help:
http://msdn.microsoft.com/msdnmag/issues/04/03/HighResolutionTimer/default.aspx[^]
|
|
|
|
|
LARGE_INTEGER startCount, endCount, freq;
QueryPerformanceFrequency(&freq);
QueryPerformanceCounter(&startCount);
YourFunc();
QueryPerformanceCounter(&endCount);
printf("Elapsed time = %lf", (double)(endCount-startCount)/freq);
|
|
|
|
|
Is is possible to create an object that inheriets from a MFC object in .NET?
|
|
|
|
|
|
While this article does address using C++ in .NET, it fails to address inheritience.
|
|
|
|
|
What do you mean by "inheriets in .NET?" What is different about your derived class that makes you ask this question? Is it in a language other than C++? Is it under the CLR's control?
Sincerely,
-Ron
|
|
|
|
|
I have a managed class called ConfigManager , with a static method:
static void StartService()<br />
{...} .
When I compile, the compiler changes the method name to
<br />
static void StartServiceA()<br />
{..} .
If I change the method name to StartServiceBlaBla , the compiler doesn't change it.
Any one has an idea?
Thanks,
Yaakov
|
|
|
|
|
When you include windows.h it defines some macros. One of them is like this:
#define StartService StartServiceA
This is used to replace the windows function StartService with the non-unicode version of it. To get around this problem you can either rename your function or include the following line after you include windows.h.
#undef StartService
|
|
|
|
|
|
Does anyone know how to find a local group's permissions? I am enumerating through the local groups on my machine using the NetLocalGroupEnum API, but when I check the group using the NetLocalGroupGetInfo API, I only get two pieces of information that I don't need:
1 The group's name - already have, don't need again
2 The group's description - doesn't serve my purpose
Are there any APIs or methods that I can use to find if a local group is an admin group? I've spent many many hours working on this problem and I am getting a little frustrated.
|
|
|
|
|
I had inserted from InsertMenu->new ATL Object->Miscallenous->Dialog
Give it short name MyDialog.Then inserted Microsoft Web Browser(By Right clicking on dialog and choosing
insert ActiveX Control).Now my problem is how can i call www.yahoo.com
in the control and get Documentcomplete and events such as were user clicked.
Plz help Me
Thanks in advance
Devom
|
|
|
|
|
|
I migrated a Visual Studio 6.0 C++ project to Visual Studio .NET 2003, and when I tried to build it, got the following linker error:
Scheduler error LNK2019: unresolved external symbol __aulldvrm referenced in function "unsigned __int64 __cdecl AdjustHilTime(unsigned long)" (?AdjustHilTime@@YA_KK@Z)
I received a similar error with __ftol2 (instead of __aulldvrm), and fixed it by adding the following code:
#if (_MSC_VER >= 1300)
//VC7 or later, building with pre-VC7 runtime libraries
extern "C" long _ftol( double ); //defined by VC6 C libs
extern "C" long _ftol2( double dblSource ) { return _ftol( dblSource ); }
#endif
Can anyone tell me how to do something similar to fix my __aulldvrm problem?
TB
|
|
|
|
|
You've included AdhustHilTime from a header file, but you've not linked to the binary file that contains it. You need to add the library to your linker settings.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I was wondering if anyone know where I can get a webpage control. I.E. a viewer control that will display a webpage ( I believe VB had something like this at one point).
Thanks,
|
|
|
|
|
You can host IE as a control.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I right click on a selected datagrid cell and my context menu does NOT display. However, if I right-click on a non selected field I DO get my context menu? How can I fix that.
I used SPY++ and noticed that right-clicked on a selected cell is different then clicking on an unselected cell.
HELP
System::Void contextMenu_Popup(System::Object * sender, System::EventArgs * e) {
MenuItem* menuItem1 = new MenuItem(S"&Match");
this->contextMenu->MenuItems->Clear();
this->contextMenu->MenuItems->Add(menuItem1);
}
TIA,
James
|
|
|
|
|
How can I do that, in C++?
I heard I had to use a API, but I don't even know what that is...
I just need a simple function that replaces or adds a key to the registry, can anyone help me with this?
|
|
|
|
|
Sorry, it was me who just posted this question, I wasn't registered... can anyone please help me with this?
|
|
|
|
|
|
Hi, I found the following link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vcconaddingmctoexistingapplication.asp[^]
for Adding Support for Managed Extensions for C++ to an Existing Application.
To modify the project settings
I followed the following steps.
1)Open the target project in Visual Studio.
2)In Solution Explorer, right-click the project node and click Properties.
The Property Pages dialog box appears.
3)In the left pane, click the C/C++ folder.
4)Click the General folder under C/C++.
Set the Compile As Managed property to Assembly Support (/clr).
However, I dont' see (Step 4) Compile As Managed property at all in my C/C++ folder.
Why is it? Is it because of my software? I'm using Visual Studio Version 7.1.3088.
Thank you
|
|
|
|
|
Basically, all you need to do is set the compiler option to /clr. You can do that by opening the Command Line folder under the C/C++ Folder located in your project property sheet, as you mentioned above. Then, just add the compiler switch to the list.
|
|
|
|
|