|
Use netstat.
netstat -p TCP /b to list all opened TCP ports along with the exe's name.
or
see telnet
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hello everyone,
I have successfully setup remote debugger for Visual Studio. My question is about how it works internally to match remote execution binary to source codes on host machine. Any points for how it does the match? Do I need to deploy the same PDB to both remote and host machine?
thanks in advance,
George
|
|
|
|
|
|
Because none of those make sense used on a class member.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
but when we write like
class a
{
int i;
};
then obviously by default data type of i is auto int
my question is why compiler don't accept this,and why none of those make sense as you wrote.
if u have any link related to this question please send me
thank u in advance
|
|
|
|
|
rajneshmalik wrote: then obviously by default data type of i is auto int
No, it isn't. i is a class member.
auto variables have a local lifetime - the lifetime of i is determined by the
lifetime of the object it is in.
register - same thing. You've only declared i. Until there's an instance of an "a" object,
i doesn't exist. How, then, can you give i a storage specifier?
extern? Makes NO sense. How can a member of an object be somewhere else - some external location?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all..
I want to compare two xml files using vc++ and store the output in the xml format...
When i searched in MSDN .I got the tool..i.e XML Diff and Patch GUI Tool...
Can i use the tool in my program..I am using Visual Studio 6.0...or it supports only .net framework
If yes means how can i use it..
should i install anything or
i should include anu dlls or
include any .h files.
I went through msdn..but i got confused a bit..please can anyone brief me how to use it..
If i got some example..it will well and good....
else brief about so that i can understand and use it..
thank you
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
The code is written in C# so it's better to use Managed code itself to get teh required functionality from this library. Otherwise you will have to port the code to C++.
There are some tweaks to call C# code from native C++.
Exposing .NET Components to COM[^]
Calling C# code from C++[^]
.NET COM IOP[^]
Anyway I've never tried this out. Please check it.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Hi..
Thanks for your reply..
Is there any tool to compare two xml files using vc++...
or else can u provide me a any links where i can get some vc++ code examples to compare two xml files
thank you
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
I have a dialog based application.I use a text box in it.what i want is write the details from that text box into a text file.
when i wrote the code ,the data written into the file was as follows..??a??????ý????ý
My code is,
CString str;<br />
GetDlgItemText(IDC_EDIT1,str);<br />
fstream f;<br />
f.open("C:\\myfile.txt",ios::app);<br />
f.write((LPCTSTR)str,10);<br />
f.close();<br />
|
|
|
|
|
str is uninitialized and therefore the value displayed in the edit box is a garbage value.
Initialize the str to something meaningful.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
initialized it to spaces.-> CStraing str="";
But it still doesn't work.
|
|
|
|
|
CString str="";
GetDlgItemText(IDC_EDIT1,str);
fstream f;
f.open("C:\\myfile.txt",ios::out|ios::app);
f.write((LPCTSTR)str,str.GetLength ());
f.close();
This will help
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
yes,now that works.
what if i want to write the new value in the edit box in newline.now all the data are written in single line.
|
|
|
|
|
Append \r\n in the string where you want a line break
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
i tried f<<endl .that worked.Thanks...
|
|
|
|
|
projectip wrote: f.write((LPCTSTR)str,10);
I think this statement makes the problem. give proper length of the source buffer. If the string length less than 10, this problem may occur.
Please try with this.
f.write((LPCTSTR)str,str.GetLength());
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
projectip wrote: f.write((LPCTSTR)str,10);
Why the unnecessary cast?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I followed this link for embedding manifest in the exe.
http://msdn.microsoft.com/en-us/library/bb756929.aspx
I could see RT_MANIFEST markup in the exe(using resourcehacker).
But yesterday when i rebuilt my application (both in vista and windows 2003 server) i am not able to see RT_MANIFEST markup in the exe. Instead i saw a number 24 under that my manifest file is there.
Are some settings changed? I am not able to figure it out. Can any one help me?
Regards
|
|
|
|
|
Did you change the build order from Unicode?
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
|
When drawing a bitmap, I want to draw it with a new alpha value as below. Do I have to clone a bitmap and make changes pixel by pixel?
DWORD Gray1000=pClr->GetRed()*299+pClr->GetGreen()*587+pClr->GetBlue()*114;
BYTE newAlpha=BYTE(Gray1000/1000);
system
|
|
|
|
|
If it is a replace a single color .You can do raster operations.
else create a platte and store the color reference tables.And update the color by pixcel wise.
Help:
HBITMAP GlobalBlitReplaceColor (HBITMAP hBmp,COLORREF cOldColor,COLORREF cNewColor,HDC hBmpDC)
{
HBITMAP RetBmp=NULL;
if (hBmp)
{
HDC BufferDC = CreateCompatibleDC(NULL); // DC for Source Bitmap
if (BufferDC)
{
HBITMAP hTmpBitmap = (HBITMAP) NULL;
if (hBmpDC)
{
if (hBmp == (HBITMAP)GetCurrentObject(hBmpDC, OBJ_BITMAP))
{
hTmpBitmap = CreateBitmap(1, 1, 1, 1, NULL);
SelectObject(hBmpDC, hTmpBitmap);
}
}
// here BufferDC contains the bitmap
HGDIOBJ PreviousBufferObject = SelectObject(BufferDC,hBmp);
HDC DirectDC=CreateCompatibleDC(NULL); // DC for working
if (DirectDC)
{
HDC MaskDC=CreateCompatibleDC(NULL); // DC for mask
if (MaskDC)
{
// Get bitmap size
BITMAP bm;
GetObject(hBmp, sizeof(bm), &bm);
// create a BITMAPINFO with minimal initilisation for the CreateDIBSection
BITMAPINFO RGB32BitsBITMAPINFO;
ZeroMemory(&RGB32BitsBITMAPINFO,sizeof(BITMAPINFO));
RGB32BitsBITMAPINFO.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
RGB32BitsBITMAPINFO.bmiHeader.biWidth = bm.bmWidth;
RGB32BitsBITMAPINFO.bmiHeader.biHeight = bm.bmHeight;
RGB32BitsBITMAPINFO.bmiHeader.biPlanes = 1;
RGB32BitsBITMAPINFO.bmiHeader.biBitCount = 32;
RECT tmprect = {0,0,bm.bmWidth,bm.bmHeight};
// creating the Monochrom bitmap with existing bitmap dimmensions
HBITMAP bitmapTrans = CreateBitmap(bm.bmWidth,bm.bmHeight,1,1,NULL);
DeleteObject(SelectObject (MaskDC,bitmapTrans));
SetBkColor(BufferDC,cOldColor);
RetBmp = CreateBitmap(bm.bmWidth,bm.bmHeight,1,32,NULL);
HGDIOBJ PreviousObject = SelectObject (DirectDC,RetBmp);
HBRUSH sb = CreateSolidBrush(cNewColor);
FillRect(DirectDC,&tmprect,sb);
DeleteObject(sb);
//Computing the raster operations on Bitmap to load the colors dynamically into bitmap
BitBlt(MaskDC, 0, 0, bm.bmWidth, bm.bmHeight, BufferDC, 0, 0, SRCCOPY);
BitBlt(DirectDC, 0, 0, bm.bmWidth, bm.bmHeight, BufferDC, 0, 0, SRCINVERT);
BitBlt(DirectDC, 0, 0, bm.bmWidth, bm.bmHeight, MaskDC, 0, 0, SRCAND);
BitBlt(DirectDC, 0, 0, bm.bmWidth, bm.bmHeight, BufferDC, 0, 0, SRCINVERT);
// releasing the memory
DeleteObject(PreviousObject);
DeleteObject(bitmapTrans);
DeleteDC(MaskDC);
}
// clean up
DeleteDC(DirectDC);
}
// BufferDC is now useless
if (hTmpBitmap)
{
SelectObject(hBmpDC, hBmp);
DeleteObject(hTmpBitmap);
}
SelectObject(BufferDC,PreviousBufferObject);
DeleteDC(BufferDC);
}
}
return RetBmp;
}
|
|
|
|
|
followait wrote: Do I have to clone a bitmap and make changes pixel by pixel?
You do if you don't wan't to change the original bitmap.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Guys i have just made a winsock programme(console mode).
It is a simple programme in which the client software
displays the text inputted in the server programme
using the function cin.getline().Now i want to make a chat programme
conlose mode.But i tried to use the send() function in the
client software but it is not working,so how can the two programme
chat wuth each other.My main point is that i am trying to maje chat
programme can anybody tell me some god tutirial or give me some guideline
|
|
|
|
|