|
I'm not 100% sure, but I don't believe it does. I tend not to give it the chance to try - if you force it to do exactly what you want there is less chance of something going wrong. Running in debug should tell you if there are any unreleased COM objects lying around if you want to check.
IMO It's just as easy to manually remove the filters when you're done.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Dear all
i want to use the "Print to file" windows functionality in my win32 SDK (No MFC) application. Is there any way i can do it? Also i want that no dialog boxes should be display as it appears in windows print dialog box.
____________________________________________________________
rishabhs
I think therefore I am.
|
|
|
|
|
If I had a very simple program which was spread over two projects, e.g.
Project 1 called "print" containing print.c:
#include <cstdio>
extern void printsomething();
void main (void)
{
printsomething();
return;
}
Project 2 called "printsomething" containing printsomething.c:
#include <cstdio>
void printsomething();
void main (void)
{
printf("Hello world! from printsomething main.\n");
return;
}
void printsomething ()
{
printf("Hello world!\n");
}
... where the "printsomething" is a dependancy of "print" why don't they link to produce the "print.exe".
|
|
|
|
|
Hi,
In XP OS, if we open more than one application instance (2 - 3 word instances), in the taskbar, toolbar button goes in group button(dropdown button), if we right click on the toolbar button, it will display the menu (cascade, tile horizontally, minimize group, close group). I need to find out the exe name (winword.exe), when I right click on drop down toolbar button. Is it possible please help.
Thanks in Advance
|
|
|
|
|
HWND hwndShell = FindWindow(TEXT("Shell_TrayWnd"), TEXT(""));
HWND hwndReBar = FindWindowEx(hwndShell, NULL, TEXT("ReBarWindow32"), TEXT(""));
HWND hwndMsTask = FindWindowEx(hwndReBar, NULL, TEXT("MSTaskSwWClass"), TEXT("Running Applications"));
HWND hwndToolBar = FindWindowEx(hwndMsTask, NULL, TEXT("ToolbarWindow32"), TEXT("Running Applications"));
here u've a sample to retrieve window handle of the toolbar where your group belong to.
this group is only a button.
so now u should use toolbar functions to retrieve specified info. i think in case u've to get selected item. or handle oncontextmenu.
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
|
Hello to all!Hope anyone could figure out my problem... i have a program in VC++ 6.0(w/ sp6) and created a Release version... i have compiled and it runs in my pc so well. So i think i will have no problem distributing it to another pc. When i distribute the Released Exe, the program cannot proceed, just the login session and then it exits... when i try to traced the error, i found that i having trouble with _CommandPtr->ActiveConnection. here is the code snipet..
void CBPLSAssessmentApp::AuditTrail(CString MCode, CString ATable, CString DObject)
{
CBPLSAssessmentApp *pApp = (CBPLSAssessmentApp*)AfxGetApp();
CString sQuery,sCurrentDate;
COleDateTime m_vodtMonth,m_vodtDay,m_vodtYear,m_vodtSaveTime;
_RecordsetPtr pRSet = NULL ,pRights = NULL;
_CommandPtr pCmd = NULL;
try // CTS 02022004 add try and catch
{
pCmd.CreateInstance(__uuidof(Command));
pCmd->ActiveConnection = m_pConnection; // <-- this is the culprit
sQuery = "insert into a_trail values ";
sQuery+="('"+ SetStrLength(sUser,10) +"',";
//m_vodtSaveTime = COleDateTime::GetCurrentTime();
m_vodtSaveTime.ParseDateTime(GetSystemDate());
sCurrentDate.Format("%04d-%02d-%02d %02d:%02d:%02d",
m_vodtSaveTime.GetYear(),
m_vodtSaveTime.GetMonth(),
m_vodtSaveTime.GetDay(),
m_vodtSaveTime.GetHour(),
m_vodtSaveTime.GetMinute(),
m_vodtSaveTime.GetSecond());
sQuery+=" '"+sCurrentDate +"',";
sQuery+=" '"+ SetStrLength(MCode,10) +"',";
sQuery+=" '"+ SetStrLength(ATable,30) +"',";
sQuery+=" '"+ SetStrLength(m_sComputerName,30) + "',"; // JJP 10112003 for Manila Workstation
sQuery+=" '"+ SetStrLength(DObject,200) +"')";
pCmd->CommandText = _bstr_t(sQuery);
pCmd->Execute(NULL, NULL, NULL);
}
catch (_com_error &e)
{
_bstr_t bstrDescription(e.Description());
MessageBox(NULL,LPCTSTR("CBPLSAssessmentApp:AuditTrail\n"+bstrDescription),APP_NAME,MB_OK);
exit(1);
} // CTS 02022004 add try and catch
}
as you notice, i have a try and catch but when i run the program... its passes through but no values is being catched...
can anyone figured it out?
|
|
|
|
|
My guess would be that the pCmd.CreateInstance(__uuidof(Command)); is failing, and so your (smart) pointer is NULL when you dereference it on the next line. This will not give a COM exception, but probably an access violation (0xC0000005), which is not being caught.
I would suggest testing pCmd after the CreateInstance , and also adding in a catch(...) block, and see what exception (if any) is caught there.
|
|
|
|
|
Graham Bradshaw wrote:
I would suggest testing pCmd after the CreateInstance, and also adding in a catch(...) block
how can i test for the _CommandPtr? i already catch it but no access violation or com exception has been produced... i also compiled my program in another computer and then transfer the exe to another computer and it works very well... so i think my computer has a problem about the msado15.dll where database pointers originates.... ive test and compiled it in 2 different computers and distribute the exe and its running fine... but then again, i tried once more to my computer and it fails... is there a possibility to overwrite my msado15.dll? how can i know if im using the right dlls for ado connections?
|
|
|
|
|
Hi, I am a newbie. I am currently working on a research. I need to create a specific packet such as a TCP/IP packet or a DICOM packet over ethernet. After i create this packet, i have to send them through a network. Do anyone have any idea on where can i download a C or java programming source code on creating a specific packet over ethernet and send it through a network? Can anyone please provide some useful web sites that can guide me through this?
Thank you very much!
|
|
|
|
|
Its been a long time since I did this, but 10 years ago... I could do this with linux, but I ran into some bugs in the TCP/IP stack. I wouldn't be surprized (though I don't know) to find out that windows does not allow you to send arbitary packets.
Richard W. Stevens wrote the books on this subject, (he died a few years back, so they are somewhat out of date, but still worth looking at) check out Amazon or the like for his network programing books. It is all unix specific, but still highly recomended.
I discovered that I could not send just any ethernet packet. Most hardware will not allow you to set your own ethernet checksum! (this was a big deal, I was supposed to test a router to make sure it checked the checksum)
Even if I remembered how to do this, I wouldn't tell you. There is too much potential to do evil. I crashed many routers in the lab (of many different brands), and I have no reason to belive they have been fixed as what I was doing is illegal. Basicly, I'm hoping that if you are smart enough to figure this out, you are also smart enough to not unleash it on the world.
In short, if you can live with standard network programing, basic client server stuff, there are plenty of examples on the net, start searching. If you want to go deeper, don't be surprized if there are walls you cannot overcome.
|
|
|
|
|
Hi, first of all , i would like to thanz you for your reply. Actually i am currently an undergraduate. The problem i am facing now is regarding to my thesis. In my thesis , i am required to write a program to generate packets and send them over a network. All these have to be done in a Linux environment. To be more precise, i have to generate a DICOM packet. I have done research on DICOM packet and i found that DICOM sits on a upper layer than TCP/IP. Therefore, i have to know how to create/generate a TCP/IP packet before i can generate the DICOM packet.
Since you have experiences in doing this, can you pls provide me some useful web sites where i can search for some example codes that can be my references? I have a question here and i hope that you can help me out with it.
1. If i want to write a C program to generate a TCP/IP packet, how could i include the structure definitions of the packet in the program? (e.g. the size of header, payload or etc?)
I am currently in a mist in doing this and i sincerely hope that you can provide me with some guidances.
Thank you!
|
|
|
|
|
First off all let me say I work in the medical IT industry and know how extensive the DICOM standard is. We (UltraRAD Corporation) outsourced most of the low-level network communications for our products, however maybe I can give some insight. I believe The DICOM standard sends data from an Upper-layer protocol sitting above TCP/IP, like FTP,SMTP,etc...
So I don't believe your TCP/IP packet, that you create, is going to be a custom TCP/IP packet, it will follow the IETF standard. Look more into Ethernet network layers for that info. Now your 'DICOM Packets', I think these are command sets check the standard, you make will be passed to TCP/IP in a data stream, I don’t have specific implementation on that for Linux. All this is described in medical.nema.org PS 3.8-2003 section 9.
Hope that rambling helps somehow,
~rlc
|
|
|
|
|
Thank you for your reply. Do you also deal with TCPDump (a sniffer which is used to capture packets include DICOM packet).
I am using TCPDump from David Clunie's site to support DICOM packet capture . However, i have a few questions on the operation of tcpdump in supporting DICOM packet capture.
What i understand here is, DICOM is in a layer upper than TCP layer so if
TCPDump can only work up till TCP layer, it is impossible for it to
capture DICOM packet unless there is something specified in the header
of the TCP packet that this TCP packet is actually a DICOM packet and
therefore it can be captured by the TCPDump and identified it as a
DICOM packet.
3) Can you please explain to me in detail on:
a)how do we recognize the DICOM packet in TCP layer?
b)DICOM "packet" is a DICOM Image Object encapsulated in a TCP packet and the TCP packet encapsulted in the IP packet. Is there any specifications in the header of the TCP/IP packet which allows us to recognize the DICOM packet which is encapsulated in the TCP/IP packet?
Hope that you are willing to start correspoding to me now. I really need your help to clear out my problems. Thank you very much!
Regards,
Yee
|
|
|
|
|
Dear:
I building ISAPI filter that will block user when requests size reach specific number, example: i will redirect the user to Error Page when the size of requests reaches 200k.
My question what is the way to count the size of all requests to IIS.
Thanks
|
|
|
|
|
You can get the size by OnReadRawData() function.
das
|
|
|
|
|
Hi, I'm trying to port an existing vc++6 project to vc++ 7.1 and I have run into some major linking problems regarding the usage of CString.
First when I linked in vc++7.1 I got alot of linking errors like this:
error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall ATL::CStringT<char,class StrTraitMFC
I then read Knowledge Base-artikel - 309801 about CString changed to template and (as microsoft suggested) added this to my stdafx.h:
template class __declspec(dllimport) CStringT<TCHAR, StrTraitMFC<TCHAR, ChTraitsCRT<TCHAR> > >;
template class __declspec(dllimport) CSimpleStringT<TCHAR>;
But now when I link I get (alot of) warning messages like this:
warning LNK4049: locally defined symbol ??4?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@QAEAAV01@PBD@Z (public: class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > > & __thiscall ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > >:: operator=(char const *)) imported
and lot of errors like this:
error LNK2001: unresolved external symbol "public: class CString const & __thiscall CString:: operator=(class CString const &)" (??4CString@@QAEABV0@ABV0@@Z)
I would really appreciate some help with this difficult problem!
Regards
/Mike
|
|
|
|
|
Hi
there is a help file named vc6.chm. i dont know where to find it on net as i have forgotten the site. can anybody tell me where to find it. it contains all the source code examples of vc6.
reagrds
swarup
|
|
|
|
|
At the moment I have a project with many Modla dialogs.
Before I start a new one I hide the old one giving the illusion
its been killed. Problem I have is the taskbar disappears too.
How can I get around this ??
thanks im being lazy here but times a factor ... ne I have little of.
regards
Karl
|
|
|
|
|
el_scrub wrote:
Problem I have is the taskbar disappears too.
Your code is making the taskbar disappear. Wow! Not that it's impossible, but to do it accidently is really strange.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Duh apologies,
I mean the Taskbar Icon associated with the application.
|
|
|
|
|
Whenever ShowWindow(SW_HIDE) is called, it is supposed to hide all remnants of the window. It wouldn't make much sense to leave the icons in the Taskbar.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
But with other Modals open and Visible I thought It the icon should stay,, but no because its linked to the main window set by my App class.
... naruhodo
|
|
|
|
|
Ok, i have been seeing stuff like this for a while in different apps.
Now what do they mean by this?
With the first part i would be thinking it bind itself to explorer.exe, the second part suggests otherwise
here is an exact quote from one of them.
"No Process Visible in any Task manager,Process explorer(2k,xp,9x),Injects into Explorer.exe on startup and exiting the parent. "
Can anyone explain to me what they mean by this?
|
|
|
|
|
It means the whole code of the application consist on launching a remote thread (via CreateRemoteThread or equivalent) into the explorer.exe process and exiting
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|