|
i read and reread his post again, and still not sure about that
maybe a reply will guide...
|
|
|
|
|
poda wrote: But I am in need of the code just only to unlock the file
and delete it.
The quote is from the original message. I think the badly formatted message makes it difficult to read.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Yes I want to do it programatically.
When we compile and link a project,the compiler will
generate many files(like obj,map,ils,tds etc).
One of them is .tds file.
But this file is 'hold' by the IDE of Borland C++.
How to release this 'lock' so that it can be deleted.
|
|
|
|
|
i don't know borland, but maybe if you just close the IDE, it will release the file, won't it ?
|
|
|
|
|
Ofcourse,it will release the file.
But I will use the linker to create DLL as
a separate process for which the .tds file has
to be deleted when the IDE is open.
I need to know to how to release or unlock a file
which is holding by a application.
Thank you
|
|
|
|
|
Hi,
I want to communicate with a USB device from my PC by using Visual C++.The device is a RF-ID.So I do not need to transfer large files, I only need to read the ID from RF-ID. How can I do that simply? I search the web some but the sources that I found are more advanced than I can understand. Can you seggest me a simple way because I am not much experienced?
Thanks for any help
ibrahim
|
|
|
|
|
I think you'll get more help here [^].
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
|
|
|
|
|
You have to get a handle to the driver that is supplied with the USB device (using CreateFile). Then you can communicate with the driver using WriteFile and ReadFile. For more advanced stuff, you can then use DeviceIOControl. Anyway, all of that should be documented with the device. You also need to have the device driver.
|
|
|
|
|
Firstly I have not the control codes for the device. I am understanding that I should want the control codes from the producer company?
And If I know the contol code how can I use it?
|
|
|
|
|
Where did you get this device from ? I guess you should have received some documentation with it. Did you take a look at it ?
|
|
|
|
|
iayd wrote: And If I know the contol code how can I use it?
No information about the device = use it a paperweight, depending on how pretty it is.
I've had to deal with some odd devices in my time, and most supplier companies are quite good at emailling you the obsolete device pdfs if you ask politely and give them some time. After all, you're not spending money with them at the moment... That's already happened.
Or get numbers off it, and google it. You'd be surprised just how much info on odd wacky stuff is floating about out there.
Once you have the information, you may even get a COM object that does the work for you, or you'll need WriteFile / ReadFile / DeviceIOControl to talk directly to the driver.
Iain.
-- Edited once I reread original post!
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
Hi all,
How can I differentiate between SATA and IDE/ATA hard drive.
I have more than one hard drive attached to my machine, Now I have to code in VC++ by which it can be recognize that this is SATA hard drive and this is IDE/ATA.
I am thrying to get it by using Win32_diskdrive WMI class. There is one property "InterfaceType" that is returning IDE for both hard drive, while I have one SATA and one ATA/IDE.
Is there any other WMI class by which it can be recognized?
thanks.
|
|
|
|
|
I there
I' new into dynamic programming and i have to write some code using OpenCV lib.
I did my job until now, but my software doesn't reuse memory. My application use 4mb/sec from my RAM.
How to check what part of my code consume so much memory?
I'm using VS 2005 and my application is written in VC++ with OpenCV
Edit/Delete Message
|
|
|
|
|
If you want to find leak memory on your project see Visual Leak Detector[^] if else more info is helpfuls.
|
|
|
|
|
I want to know how to detect object presence in a scene.Will the opencv functions edge detection and square detection do it?
|
|
|
|
|
|
Sir,
I have tried with the code.But i get an error message as
"fatal error C1083: Cannot open include file: 'cvaux.h': No such file or directory"
Please do help me in doing the code.ie,how to arrange all the files..
|
|
|
|
|
Have you included the # include and the file with "Add to project" ?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
I have added all the files using "Add to Project".
It shows an error "missing file dshow.h"
"see previous definition of '_WIN32_WINDOWS'"
|
|
|
|
|
Hello,
I have an windows application that has been working for about a year.
It consists of an application that uses dlls to provide localized langauge support. Each dll simply contains the dialogs used in the main app but with the text translated. They also contain the resource.h file.
I have recently made some updates to the main app which have required new buttons and text on the dialogs. The same changes have been made to the dialogs in the dlls.
When I run the app and select an alternate language the appropriate dll is loaded. However a call to GetDlgItem fails because it cannot find the Resource ID listed as it's argument. I know this ID exists, and in fact have placed the offending code within #ifdef just to prove that the symbol is indeed defined.
The same resource ID names are used in both the main app and the dlls.
When using the mains apps dialogs (english) all is fine, but when using the dialogs loaded from the dll a NULL pointer is returned by GetDlgItem.
The call to getDlgItem is not new and has been working fine until now.
Can anyone offer any insight?
The code is listed below. Originally I had this all on one line as per the line commented out. However I have expanded to debug.
Cheers
Rich
Static* pItem;
#ifdef IDC_STATIC_OTHER_CURR
pItem= (CStatic*) GetDlgItem(IDC_STATIC_OTHER_CURR);
if(pItem == NULL)
{
}
else
{
pItem->GetWindowPlacement(&wpa);
}
#endif
|
|
|
|
|
kildareflare wrote: The same resource ID names are used in both the main app and the dlls.
Can you check ,although the ID names (MACROS) are same, the values of the IDs are same. I mean IDC_STATIC_OTHER_CURR in exe may be 100 while in dll it may be 200.
|
|
|
|
|
Hi Rajkumar
Yes it has the same ID number in both and the name is identical too.
Rich
|
|
|
|
|
The actual location of the failure is in the function below
BOOL CWnd::GetWindowPlacement(WINDOWPLACEMENT* lpwndpl) const
{
ASSERT(::IsWindow(m_hWnd));
lpwndpl->length = sizeof(WINDOWPLACEMENT);
return ::GetWindowPlacement(m_hWnd, lpwndpl);
}
It fails at the ASSERT becuase m_hWnd cannot be evaluated
"unused CXX0030: Error: expression cannot be evaluated"
the following function call precedes the one above (see original post):
CWnd* CWnd::GetDlgItem(int nID) const
{
ASSERT(::IsWindow(m_hWnd));
if (m_pCtrlCont == NULL)
return CWnd::FromHandle(::GetDlgItem(m_hWnd, nID));
else
return m_pCtrlCont->GetDlgItem(nID);
}
In this case m_hWnd does have a value, so it's somehow lost between the two calls...? Like I say this has allways worked fine until now...
Rich
|
|
|
|
|
kildareflare wrote: In this case m_hWnd does have a value, so it's somehow lost between the two calls...?
no, GetDlgItem is called for your dialog (Parent) window, while GetWindowPlacement is called for the expected child window (static control) so m_hWnd is different and unique.
|
|
|
|
|
kildareflare wrote:
pItem= (CStatic*) GetDlgItem(IDC_STATIC_OTHER_CURR);
can you try get what is the error by,
::GetDlgItem(GetSafeHwnd(), IDC_STATIC_OTHER_CURR);
dwErr = ::GetLastError(void);
can you ensure whether the dialog resource is successfully loaded from dll, did you successfully displayed the dialog, from the next post of you, it seems the m_hWnd handle is not valid, means the dialog may be not successfully created from resource of dll, can you post how you create the dialog from dll resource. at which method of dialog class you are calling the GetDlgItem() function.
|
|
|
|