|
While LOGBRUSH's lbStyle is BS_DIBPATTERN,how to construction a pattern brush?
I read MSDN but can't understand,what's "a packed DIB",How to "fills the memory with the packed DIB"?By the way,what's difference between BS_DIBPATTERN,BS_DIBPATTERNPT and BS_PATTERN?
Who can show me some example of CBrush::CreateBrushIndirect() while lbStyle is BS_DIBPATTERN?
|
|
|
|
|
hi i have a function that is being passed a reference to a vector
the function crashes on an assert. in an area before the vector is even accessed
however if i comment the line where the vector is accessed the function executes no problems
the thing is tho when its not commented it crashes way before the vector is even called
i have stepped through the function an its giving me the assert area basicly when first thing in the function is called no where even near the vector im actualy using the same vector before the function is even called and doing similar things to it in the function before so i know that the vector is valid. and if i rearrange the functions it still crashes in the same function at the same place id paste the code but its fairly large and i doubt it would be much help
can someone please give me some advice
|
|
|
|
|
have you followed the call stack? Often you can find out there were it goes wrong.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Is this function exported one from a dll?If it is then try to change the runtime library in the project settings (and look for "STL access violation DLL" keywords in MSDN).
|
|
|
|
|
Where is the assert? Is it in your code or in the STL code for vector?
What is the assert checking?
|
|
|
|
|
Hello Everyone, i got one question about how to get data from excel files. I know the one way - to query to it using ADO. But if the table doesn't have a name - i can't get data from it.I just want to access to excel tabular data as to array. Something like this: CString str = a[3][2]; Is there avaluable sources in the Internet?
Any help would be appreashiated
|
|
|
|
|
Check this link:
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q178/7/81.asp&NoWebContent=1
Imagine that you are creating a fabric of human destiny with the object of making men happy in the end, giving them peace and rest at last, but that it was essential and inevitable to torture to death only one tiny creature..and to found that edifice on its unavenged tears, would you consent to be the architect on those conditions? Tell me, and tell me the truth!
-Fyodor Dostoevsky, The Brothers Karamazov
|
|
|
|
|
Hi there,
I have to develope Network monitor in C++, for which I'll be using Winpcap libraries. This Network monitor will capture packets, display them, find number of packets transmitted by system per second etc. Now question is how I'll scan network using 'IP Address' because I think Winpcap is useful only if you knew MAC address. While I have to develop such software which on getting IP Address, analyze all network data that is transmitted by that computer.
I'll highly appreciate if anyone comes up with any good suggestion.
Thanks.
A Khan
|
|
|
|
|
|
Thanks for reply. But please elaborate how do you think Wnet functions will help. I have gone through MSDN, other resources and my understanding is; We CANNOT retrieve MAC address if we have IP address of any machine in network.... if this conclusion is wrong, then please do identify how can I do the same.
Thanks again.
|
|
|
|
|
i just misunderstand u. i think u need to enumarate network resources: IP, etc.
hm. how to get MAC from ip. what about network utilities, smth like nbtstat...
|
|
|
|
|
The problem you will have here is seeing the network traffic from the other computer.
If the machines are switched to the desktop you will not see the traffic from the other machine unless it is intended for you.
The only sure fire way to see the traffic is to run the capture on the machine in question. I believe that WinPcap does have a remote agent capability, or at least they are planning on adding this capability.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Thanks for reply, but I am still stucked since WinPCAP just cant do this all . I have to show this thing to my boss soon and I just cant figure it out, how I will be able to do this. Do you have any more suggestions, I will be highly appreciative.
|
|
|
|
|
WinPcap works by binding to a NIC in promiscuous mode. This allows the driver to see all packets that the NIC sees i.e. all packets that your computer sees.
In order to see all packets that another computer sees you need to run WinPcap on that machine (at least in a remote agent capacity). It isn't sufficient just to expect your machine to see the packets from the other machine. (See previous reply with regards to switched networks).
If it is proof of concept that you need to show your boss it can be done for the local NIC. The principles are the same for local and remote.
Writing network monitoring applications takes time and understanding of networks. Generally they are not something that can be written in a couple of days (though drivers like WinPcap help speed up development vastly). You may want to look at the RFC's for IP (RFC 791)[^], TCP (RFC 793)[^] and UDP (RFC 768)[^]. This will give you some understanding of the structure of IP packets.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Thanks Antony for your soon reply. I have understanding of these RFCs and protocol headers but I just cant find way to get packets being recieved by other computer, of which I only knew MAC address.
Okay Winpcap is something that is making it impossible for my appplication to do the same... So do you have any idea of some other library that can give me the functionlity I am looking for.
Thanks Again
|
|
|
|
|
Sorry.... there is correction in mail in my previous mail...
Thanks Antony for your soon reply. I have understanding of these RFCs and protocol headers but I just cant find way to get packets being recieved by other computer, of which I only knew IP address, NOT MAC address.
Okay Winpcap is something that is making it impossible for my appplication to do the same... So do you have any idea of some other library that can give me the functionlity I am looking for.
|
|
|
|
|
A Khan wrote:
So do you have any idea of some other library that can give me the functionlity I am looking for.
Sorry, on this occasion I can not help. All network monitoring software packages that I am aware of work with a remote client agent on the machines in which they want to monitor. This way they get around switch blindness.
Good look in finding a solution that suits you.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
hi,
I am doing a MFC Project. I added several Labels for my Project. Now I want to change the Background Color Of the Label.How I do that?
if any one know the anaswer, pl reply me...
thanks....
|
|
|
|
|
You will have to override the CTL_COLOR handler for doing this. I m just giving a small example here.
HBRUSH CAdvSearchDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
switch (nCtlColor)
{
case CTLCOLOR_STATIC:
switch (pWnd->GetDlgCtrlID())
{
case IDC_STATIC:
pDC->SetBkColor(m_whiteColor);
pDC->SetTextColor(m_blackColor);
hbr = (HBRUSH) m_whiteBrush;
break;
........
Check this link as well
http://www.codeproject.com/dialog/colorfont.asp
Imagine that you are creating a fabric of human destiny with the object of making men happy in the end, giving them peace and rest at last, but that it was essential and inevitable to torture to death only one tiny creature..and to found that edifice on its unavenged tears, would you consent to be the architect on those conditions? Tell me, and tell me the truth!
-Fyodor Dostoevsky, The Brothers Karamazov
|
|
|
|
|
I'm trying to switch between multiple views within my application of which 2 are splitter views. Everything compiles fine and when I execute the application, the code I have for switching views seems to work just fine until I try clicking on any of the panes within either of the splitter views.
Once I click anywhere within a pane of the splitter view and then switch to another view and then back to the splitter view I had just clicked in, the pane within the splitter view goes blank upon returning to that particular view. Furthermore, if at this point I try to minimize or maximize my application, it will crash.
Any suggestions on what to investigate or links to any articles on how to deal with switching between views that contain splitter windows would be greatly appreciated.
Thanks in advance for any help!
|
|
|
|
|
Hello EveryOne,
Is there any Useful Link About Making and Using a
Dll?
Please a Simple Example(I am Beginner),
USING ONLY A DLL AND NOT ANY OTHER FILES.
Best Wishes,
Thanks.
|
|
|
|
|
|
Hi
I have developed one DCOM application, in which I use LogonUser() function to make user login. Then from the handle which I receive from LogonUser() I pass it to ImpersonateLogOnUser() to impersonate the logged on user. And after this I want to list all directory and files that a user has privileges to access.
This works exactly; fine in consolebase (Win32 Console Applicataion) application. But when I put the same code in my DCOM file (which I made using simple ATL COM EXE). It doesn't works as I expected.
Can any one help me or any other idea to impersonate the logged on user..?
Pls it's really important ....
Amarelia
|
|
|
|
|
I've got this file called myReloader.exe I'm trying to call.
ShellExecute(NULL,"open","myReloader.exe",NULL,NULL,SW_SHOWNORMAL);
will not work.
I've also tried
CStdioFile file;<br />
if (!file.Open("myReloader.exe",CFile::modeRead))<br />
{<br />
MessageBox("Could not find file myReloader.exe");<br />
OnOK();<br />
}<br />
else<br />
{<br />
ShellExecute(NULL,"open",file.GetFilePath(),NULL,NULL,SW_SHOWNORMAL);<br />
}<br />
file.Close();
But none of them works.
Any ideas why?
|
|
|
|
|
I've figured out what does not work, but I have no idea how to fix that.
GetLastError() with CreateProcess gives a 32 error "File in use", even thought it's not, I tried rebooting and it still does not work.
|
|
|
|