|
I'm starting a service that is dependent on a dll.
On doing so I get the below error
The procedure entry point XXXX could not be located in the dynamic link library LLLL.dll
The service and other related binaries are the release binaries while the dll that is copied is a debug one. I have also copied all the debug dependent dlls in the folder without avail.
Should the dll be also release to solve this problem.
|
|
|
|
|
the only way a release build will fix it is if the release build exports different functions than the debug build does. that would be unusual, though not impossible.
but, i'd look at the DLL and see if it's actually exporting the missing function or not, first.
|
|
|
|
|
Visual C 6 comes with a handy program called depends.exe. Use it and look at your executable, and it will look at dlls it depends on, and give you nice red exclamation makrs if there are problems.
I'd be shocked if later versions didn't come with an equivalent tool. I'd be surprised if they didn't come with the *same* tool. It works rather well.
Iain.
|
|
|
|
|
Iain Clarke wrote: I'd be shocked if later versions didn't come with an equivalent tool.
Through 2005 it does. Although there is no Start menu entry for it and it's buried in folder structure under Program Files so using a Search is about the only way to find it.
led mike
|
|
|
|
|
If your DLL is using the debug version(s) of MFC and/or the CRT while the
other modules use the release version(s), you may have a problem there as well.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
A piece of code performs AES encryption in the CCM mode. I want to time the encryption time of different text size. I have tried to get the encryption time using 2 different methods. 1st I've timed the main function. 2nd, i've timed the different components separately (CBC encryption time + counter encryption time) and summing at the end to get the total encryption time.
the time difference between the 2 is huge for the same 16 bytes of data. 1st method, time is 0.000293 seconds while 2nd method, time is 12.0055 seconds .
this piece of code is used to calculate time:
sec_init();
start_time = sec();
enctime = (stop_time - start_time);
cout<<endl;
printf("enctime : ");
printf("%lf ", enctime);
cout<<endl;
Can some1 please look into that and tell me where should i put the timer to get the time the program takes to encrypt the data. Tks.
|
|
|
|
|
I don't see any point in timing the individual methods, unless you can do something with them individually. If (eg) it takes a long time to connect / initialise the encryption engine (imagine loading a COM component) then maybe that time dominates if you are only encrypting one thing.
But if you are doing thousands of encryption tasks, then that actual encryption stage would dominate.
So, you won't get many meaningful answers from here without knowing more about what you are wanting to measure.
I also don't recognise sec_init () and sec() , so I have no idea if they're useful or not.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
Well the timer codes works without problem.
In fact in AES CCM, it first perform the CBC MAC step to get a tag from the plaintext and then in the counter(CTR) mode, it encrypts the plaintext and the tag to get the ciphertext.
The idea is to find out the time taken to encrypt 16 bytes of data(a block) and then I'll vary the block size to get the different encryption times.
What is bothering me is that I don't know whether to place the timer code in main()to get the encryption time or to time the CBC step and the CTR step separately and add them to get the encryption time.
Feel free if you need more info.
BTW, Is there a way to attach the cpp code?
|
|
|
|
|
One problem I can see is that one iteration of your work will be so fast that errors in timing (eg GetTickCount used to have a 19ms resolution) will swamp the times you are measuring.
If you put your code in a loop and run it 1000 times, get a time, divide by 1000 and you have a far more reliable figure. By doing a larger sample size, your timings for the two methods should converge, and your question becomes irrelevant.
My knowledge of encryption is at the hand waving stage, so I'm actively avoiding the fine detail of your application.
I don't think you can attach a file to your post - but you can cut and paste in between pre tags.
Iain.
|
|
|
|
|
OK. I'll try to use a loop in both methods and time them. Tks Iain.
|
|
|
|
|
I wish to know how to reduce the time taken by projects in a solution to load. I have over a 100 projcts in a solution and it takes too much time to load for the projects.
|
|
|
|
|
1. Can confgure VS so that not all projects got load. "Unload projects"
2. VS2008 is faster
3. Make subprojects were not all projects are included
Greetings from Germany
|
|
|
|
|
the sln file is version controlled one.
|
|
|
|
|
After the projects gets loaded there is some time spend in building something.
I think this is the ncb database. Is is a one time activity or each time I open a sln file after all the projects are build this ncb database is built from scratch.
|
|
|
|
|
Have you installed VS 2005 SP1?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I need to update the check on my menu item so created a message handler to my UPDATE_COMMAND_UI event. The code is as follows:
void CSpDlg::OnUpdateShowPeak(CCmdUI *pCmdUI)
{
pCmdUI->SetCheck( m_bShowPeakVoltage );
}
The menu item does not update, however. I'm I missing something?
Thanks.
|
|
|
|
|
If u need it before creating use the flags MF_CHECKED
You need to use DrawMenuBar() after you do any modification to the menu .
The CheckMenuItem function sets the state of the specified menu item's check-mark attribute to either selected or clear.
Good MSDN article
http://msdn.microsoft.com/en-us/library/ms647558(VS.85).aspx[^]
Vikas Amin
My First Article on CP" Virtual Serail Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
I would suggest adding your command to a toolbar to see if that updates or not.
I see your command is in a dialog. Is this a formview? If it is a modeless window, the command messages may not be routing there. Try adding the updateui handler to whatever is your CMainFrame (look in CMyApp::InitInstance to see what is being assigned to m_pMainWnd.
Have a read / google about OnCmdMsg - it may give you the clues about message routing that help you.
Good luck - missing messages are not magic, but they can be a pain to track down.
Iain.
|
|
|
|
|
For a dialog, you need to handle the undocumented WM_KICKIDLE
message to get the command enablers working.
See: WM_KICKIDLE for Updating MFC Dialog Controls[^]
If you are tracking a popup menu, you may need to set the menu
item states before calling TrackPopupMenu(Ex).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Is there a way to create a enum that contains 64 bit numbers or does the compiler always assume that an enum is an int?
for example:
enum MY_ENUM<br />
{<br />
VALUE = 0x10000000000000000,<br />
};
|
|
|
|
|
On my computer it gives
warning C4341: 'VALUE' : signed value is out of range for enum constant
but may be compiler specific
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Yes, I get the same error, and I want to know if there is a way around it...
|
|
|
|
|
sashoalm wrote: but may be compiler specific
Yes, it seems to be compiler specific accoring to the ISO standards:
The underlying type of an enumeration is an integral type that can represent all the enumerator values defined in the enumeration. It is implementation-defined which integral type is used as the underlying type for an enumeration except that the underlying type shall not be larger than int unless the value of an enumerator cannot fit in an int or unsigned int. If the enumerator-list is empty, the underlying type is as if the enumeration had a single enumerator with value 0.
Best Wishes,
-David Delaune
|
|
|
|
|
I believe the standard tells the compiler to implement it like an int...
maybe Nemanja (Trifunovic) could confirm
|
|
|
|
|
No luck on a 32 bit system with Visual C++ compiler, read this page [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|