|
Thankq Mr. zubair_ahmed,
But i want 2 give clear idea abt the problem which i got.
This is the data which i want 2 send:
struct data
{
int id;
CString str1;
CString str2;
}pt;
UpdateData();
CString str;
pt.str1=m_ID;
pt.str2=m_Name;
pt.id="A";
str.Format ("%d#%s#%s",pt);
send(clientsock,str,str.GetLength(),0);
Here Iam sending structure data tru string but.. is there any way to send data by structure address??
and How to get back the data at server side
...Thanks swamy
|
|
|
|
|
You can send structures that don't contain any pointers or structs/classes that contain pointers. A CString has a pointer to the actual string data, so you can't send the struct in your example code code directly over a socket.
|
|
|
|
|
Hello Narasimha,
swamy Narasimha wrote: is there any way to send data by structure address?
I think u have both client server on same PC. And u want to do Inter Process communication via socket.
Isn't it?
regards,
Divyang Mithaiwala
System Engineer & Software Engineer
|
|
|
|
|
hi Divyang Mithaiwala,
Iam sending data from one sys to another sys (two seperate systems) with IP and port.
|
|
|
|
|
Hello swamy Narasimha,
For that u have to type cast ur struct pointer to char pointer.
But it is quit risky.
Becoz as u know that differeint platform use different size for int datatype.
And also change possion for date in struct to optimize best space.
In both of this case ur data at other end is useless.
And that's why some COM component provide fisrt field as sizeofstruct.
To conform that both end use same style for data arrangment.
regards,
Divyang Mithaiwala
System Engineer & Software Engineer
|
|
|
|
|
Ca nyou post the code for the transmit receive that you have already ? I never worked with socket before but I suppose it works like any other 'communication' media. So for example if you are trying to pass the address of your structure, it will only transmit the address and not the content.
Can you post your code to clarify the situation ?
|
|
|
|
|
I want to add some specific files and folder to the list control in my application. And also at run time am creating folder how can i add this also?
Then how this tree or list control works as Explorer?
|
|
|
|
|
Hi
Use FindFirst and FindNext to explorer directory and files
More help about FindFirst/FindNext is on MSDN
regards
KK
|
|
|
|
|
I am asking first how can i add files and folders?
|
|
|
|
|
kiranin wrote: I am asking first how can i add files and folders?
Does DlgDirList help?
TCHAR szPath[ MAX_PATH ] = { _T( "C:\\" ) };
DlgDirList( szPath, IDC_LIST_ID, 0, 0 ); This code fills out a list (IDC_LIST_ID ) with all files from C:\\ directory.
Take a look at DlgDirListComboBox too.
|
|
|
|
|
See
<br />
WIN32_FIND_DATA find;<br />
HANDLE handle=FindFirstFile("*.bmp",&find);<br />
while(FindNextFile(handle,&find)!=0)<br />
m_List2.AddString(find.cFileName);
FindClose(handle);<br />
and see CreateDirectory(...) for create a new directory
|
|
|
|
|
It is adding files only, how can i add whole attributes in a list control as report and also images,
and if i right click on it slecting the wholoe files in the list control y?
|
|
|
|
|
You said only insert files&folders for attribute did you see members of WIN32_FIND_DATA dwFileAttributes/ftCreationTime and... for inser image to your ListCtrl you can use CImageList
and 3th section i dont understand what do you need?
|
|
|
|
|
how can i open that files by double clicking on it?
If it is *.txt files it will be open with note pad ,if it is folder it will open windows explorer .
How can i do it?
|
|
|
|
|
I saw a question on codeproject about how to open files with my app but i dont know it was your question or no anyway when you double click you can use from ShellExecute but before use from this function check your string with SetCurrentDirectory and see return value if its 1 your string is directory if 0 your string is a txt file Is this your question?
|
|
|
|
|
Hi Everybody, i am struggling from last week to get some positive feedback from expert exchange. .. pls help me out here.
WE are using AT commands to get the signal strength. While testing in Terminal service in two Scenarios:
1. We can't create a AT command session once Modem is connected.
2. We can't connect the Modem to internet if AT command session is open
The problem is we can't use the same port to open two session. Is there a way to create AT command session with device directly instead of going through Port? Or Can we open a port in share mode?
I have also check it in VB6 and .net 2005 through code, the behavior is same i am getting "Can't open port" error.
Any assistance would be great help.
|
|
|
|
|
we use the function ShowWindow(SW_HIDE) to my project window
but I don't know how to communicate with the the window that be hide.
Anybody know what the function use for this issue.
|
|
|
|
|
Get your Window's Handle by ::FindWindow(...) then communicate with it vi it's handle .
|
|
|
|
|
You can use FindWindow.
Alternatively when you are hiding the window you should be having a pointer to the window or some handle to it. Using that window handle/pointer you can send message to your hidden window....
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
if you have a handle to your window you can use from it.
|
|
|
|
|
Hello
In PPC, I want to overlap two pictures and then save the overlapped
picture in the specified folder.But I use the CImage, I find that many
functions are unuseful in PPC ,and GDI functions also don't support
that.
Are there functions in PPC support to overlap pictures??
Any suggestion is useful!! Thanks!!
|
|
|
|
|
|
PPC=> Pocket PC based on WinCE
Any suggestion is useful!! Thanks!!
|
|
|
|
|
Hi, I'm tryning to get an image of a webcam and apply it into an openGL texture.
I'm initializing the window with capCreateCaptureWindow
connect to the webcam with capDriverConnect
Then I use the following code to get an HBITMAP.
capGrabFrame
capEditCopy(hWndCam)
OpenClipboard(hWndCam)
hbitmap = (HBITMAP)GetClipboardData(CF_BITMAP)
How do I get a pointer to the data to be able to feed my glTexImage2D
|
|
|
|
|
I think ::GetBitmapBits can solve your problem .
|
|
|
|