|
|
Thanks.
Brilliant tool!
Finding the leak is one thing, now I have to fix them...
What do I do about CoCreateInstance claiming to be leaking?
I can see it news "p" in CComPtr but I can't see how to delete it.
Any help greatly appreciated.
|
|
|
|
|
I think you have to call Release method of the created object.
-Saurabh
|
|
|
|
|
Below is the structure of my files:
-homeworks
--hw06-me
---hw06-question2
----meow.h
---CMakeLists.txt
--distribution
---hw06
----question2
-----meow.cpp
The meow.cpp file references meow.h like so: #include <meow.h>
This is the content of my CMakeLists.txt:
cmake_minimum_required(VERSION 2.6)
enable_testing()
add_subdirectory( hw06-question2 )
add_executable(h6-2 $../../../distribution/hw06/question2/chameleon.cpp $../../hw06-question2/hw06-question2.h)
add_test(hw06-question2 h6-2)
I've tried various combinations of include_directories, different paths inside the executable, to no avail. What am I missing here? Thank you!
|
|
|
|
|
Did you try (just a guess):
#include "meow.h" ?
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]
|
|
|
|
|
What are the different manners to run a file auto in WindowsXP? Can autorun is possible without autorun.inf file?
|
|
|
|
|
This forum is ONLY for C/C++/MFC questions.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Hi,
In my applciations i have more views like Graphics view,Alarm view like that.
In Alarm view, im displaying the list of alarms occured in applicaiton.I can also filtering the alarms thru one dialog and only filtered alarms (eg: Emergency alarms only display)will display.
But what i want is? when i click the OK buton of filter dialog,the view get splitted and in top side only filtered alarm should display and in down window all alarms should display.
Actullay My views should in normal window.Only when i pressed the button,then only it should get splitted.
I tried dynamic splitters,but error has occured.
Pls help me in this problem.
Thanks in advance
Anu
|
|
|
|
|
You should split the view on its creation and hide the top pane.
When you click on the button you can then show the top pane.
|
|
|
|
|
Thank you for your reply.
Can you give some sample?
Anu
|
|
|
|
|
I don't know.
Maybe you should try pTopView->ShowWindow(SW_HIDE);
And when the button is clicked you can do your filtering first and then call pTopView->ShowWindow(SW_SHOW);
|
|
|
|
|
Hi
Every time I tried to re compile my project. MS will compile every files in the project even most of file are not updated.
What is wrong?
Thanks,
|
|
|
|
|
You could try to delete the intermediate files and reopen the solution.
|
|
|
|
|
|
It could be an automatic update that was installed.
You could still try to clean and rebuild the project.
What program was highlighted as part of the newly installed?
|
|
|
|
|
transoft wrote: Every time I tried to re compile my project. MS will compile every files in the project even most of file are not updated.
What is wrong?
Sounds like it may be a dependency issue; your files are listed as dependent on some source or object which always makes them appear out of date. Check the project settings.
|
|
|
|
|
Is part of your project's files on a different computer (a network drive)? If so, is your computers time much different from the remote computer? Just a thought.
|
|
|
|
|
Is the computer's date and time set correctly?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Yes, You are the MAN. I spent a lot of time to find this problem.
Thanks
|
|
|
|
|
The following function is as follows
LONG ITCSCAN_GetDefaultDevice(
LPTSTR lpDeviceNameBuffer,
DWORD * pBufferLength)
with explanation as follows
lpDeviceNameBuffer [out] Pointer to buffer that will store the returned device name
pBufferLength [in/out]Pointer to a variable that specifies the size, in bytes, of the buffer pointed to by the lpDeviceNameBuffer parameter. When the function returns, this variable contains the size of the data copied to lpDeviceNameBuffer
I under stand pointer points to address and I understand that dereference points to value at an address. But these Windows API functions have me confused, expecially with the out in/out stuff.
Can anyone make this clearer using the above function as example.
I would code
LONG defaultDevice;
LPTSTR deviceBuffer=NULL;
DWORD *bufferLength=NULL;
defaultDevice = ITCSCAN_GetDefaultDevice(deviceBuffer,bufferLength)
But that returns errors and when I've made changes to get the code to compile without errors I get access violation runtime errors.
Please Help!
|
|
|
|
|
egerving wrote: Can anyone make this clearer using the above function as example.
How about something like:
char deviceBuffer[1024];
DWORD bufferLength = sizeof(deviceBuffer);
LONG defaultDevice = ITCSCAN_GetDefaultDevice(deviceBuffer, &bufferLength);
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
egerving wrote: Code does not work.
Based on your description David's code does exactly what is necessary; can you explain exactly what happens? Please remember to post your sample within the "code block" <pre></pre> tags to make it easier to read.
|
|
|
|
|
When I changed the char to TCHAR the code worked. I'm coding for windows ce and that was the difference.
Where I'm really confused it LPTSTR lpDeviceNameBuffer is pointer to a buffer to store the returned device name. How do I know what datatype to use for the buffer. It's not like
char *pdata is a pointer to
char data
because the datatype is LPTSTR
|
|
|
|
|
Its hard to say what your function does without seeing some documentation. But I suspect it is a dynamic sized buffer and when the functions fails it probably returns the size required. Something like this:
LPTSTR szBuffer = NULL;
DWORD dwLen = 0;
ITCSCAN_GetDefaultDevice(NULL,&dwLen)
if(0 < dwLen)
{
szBuffer = new TCHAR[dwLen];
ITCSCAN_GetDefaultDevice(szBuffer,&dwLen);
delete [] szBuffer;
}
Best Wishes,
-David Delaune
|
|
|
|