|
|
You are passing an ANSI string to a UNICODE function. Either switch to a MBCS build, or #include <tchar.h> and wrap your strings in the _T() macro as Whitesky suggested.
|
|
|
|
|
someone would tell me why when i add a combox control to a dialog recouse and enter some items in its data-property and press "Ctrl+T" to test the dialog but the combox showed nothing although u want to list its datas.
Thanks.
|
|
|
|
|
Hope I understood your question
when you press Ctrl+T it show dialog and values arent in combobox but i test and it work it show dialog and values in combo how to insert value to combox do you insert in property window ->Data
|
|
|
|
|
Yes,I did do it like you said. i insert values to combox in its property window ->Data. but the values couldn't appear when it was tested or run.
|
|
|
|
|
Except Ctrl+T When you run your program you cant see your data in Combobox
|
|
|
|
|
Hi,
I'm looking for a way to find the remote ip and port of a UDP packet being sent to a specific process (not my program).
I've looked at using the GetExtendedUdpTable() function on MSDN, but it will only return the local address of the UDP packet, which is useless given that i could work out the local IP easily.
I've also started to look at writing a TDI driver which would be able to return the remote IP address (at least i think it can) but i haven't seen any obvious way to connect this with a process ID. The TDI device driver tutorial here was useful, but it only seemed to show that you could use TDI instead of standard sockets. I've also read the stuff here on GetExtendedUdpTable (even if it was for c#) but as the function is limited as i mentioned before.
I know it is possible though, as a program called "TDImon" by sysinternals does it. Its closed source of course, so it doesn't really help me. It does give some clue of how it works in the help file, but i'm having enough trouble with the idea of developing a device driver, let alone making a connection between TDI and Winsock.
Quote:
TDImon gets its name from the fact that it monitors activity at the Transport Driver Interface (TDI) level of networking operations in the operating system kernel. This is the interface to protocol stacks such as TCP and UDP. Thus, the I/O activity shown by TDImon corresponds to TDI-formatted commands. Most TDI commands have direct correspondence with WinSock (the Windows socket API) functions, and thus are easy to interpret. For documentation on TDI and the commands shown in TDImon, please see the Windows NT or Windows 2000 DDK, available for free download from Microsoft’s web site.
So,
is there an easier way to do this?
Can someone please give me some pointers as where to look into TDI thats free and not the MS DDK?
Sample TDI code would be appreciated if someone has anything that will do something like what i'm looking for.
Thanks in advance
three_pineapples
p.s. In case it matters i'm developing on Windows XP SP2 using the Mingw C++ Compiler (which doesn't appear to have the GetExtendedUdpTable function, probably because the function is native to XP SP2 only).
|
|
|
|
|
Hi,
Iam using vc++ 2005 express edition ,whenever i compile my project it shows me the link error as
LNK1181:Cannot find input file ODBC32.lib
I downloaded ths from microsoft and also SDK.as per the instructions i chnaged everything?why its coming like this.
I need only Win32 Console application.
Pls help me out?
Anu
|
|
|
|
|
Is it available for linker?
|
|
|
|
|
Hi
i have written cose in vc++.now i want to integrate this code in c#.
plaese tell me the process to do so.
parshant
|
|
|
|
|
Hi all,
I am using EVC++ for developeing application on PocketPC.
I have make propertypage & initialize scroll bar in that.
But my OnInitDialog() method is not executed at all so my scrollbar is not initialize.
I have also take some reference project of this site.
regards,
Divyang Mithaiwala
|
|
|
|
|
I am trying to overload an assignment operator that that assigns an underlying type with the the assignment operator of the template's underlying class. It should be much simpler than creating the syntax of my opening sentence.
If anyone can tell me what the hell im doing wrong I would be much obliged.
template <typename T> T& operator=(T& t,const Object<T>& object);
template <typename T> class Object{
friend T& operator=(T& t,const Object<T>& object);
public:
Object();
//ommitted for brevity
protected:
Object<T>* m_daddy;
T m_data;
};
//----------------------------------FOLLOWING IS THE CPP FILE
#include "StdAfx.h"
#include ".\table.h"
template <typename T> T& operator=(T& t,const Object<T>& object){
t = object.m_data;
return t;
}
template <typename T> Object<T>::Object(){
//the constructor stuff goes here
}
I GET THE FOLLOWING ERROR
c:\Visual Studio Projects\Statistician Pro\Table.h(5): error C2801: 'operator =' must be a non-static member
|
|
|
|
|
Read your error message. operator= must be a member of the class, in this case Object .
|
|
|
|
|
Some applications use a control that combines a tree view with a list view. You can expand the nodes of the tree, and then underneath each node, you can have list items.
How is that implemented? Is there a commercial control that someone can recommend? Is it something I might be able to code myself?
Thanks,
Rich
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
I have never seen such a thing, I don't suppose you could give me an example exe name with a control like you describe. If you have the control in front of you, why not just use spy++ to see what type of control is being used.
|
|
|
|
|
waldermort wrote: If you have the control in front of you, why not just use spy++ to see what type of control is being used
Thank you, that is a good idea. An example of such a control can be found in the SysInternals Autoruns.exe utility. It seems to display headings as tree nodes, but details as list view items.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
The treelist is not a built-in control, however there are several articles here at CP that have code for such a control
|
|
|
|
|
Thanks for letting me know the name of the control: TreeList
Now I know what to look for!!
Y.T.
Rich
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
I used the following code to get file date time stamp.
CFileFind ff;
CFileStatus status;
xxxxxx;
xxxxxx;
CString strFilePath = ff.GetFilePath();
CFile::GetStatus(strFilePath, status);
CTime Ftime = status.m_mtime;
Ftime is CTime object. But CTime has limit (Year <=2037 or so)
is there another ways to get file date time stamp except CFile::GetStatus?
Thanks
|
|
|
|
|
Have you checked out the Win32 API GetFileTime ?
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Thanks. I used GetFileTime. But I got another problem.Following is my code:
TCHAR FilePath[MAX_PATH];
TCHAR NewPath[MAX_PATH];
WIN32_FIND_DATA fd;
FILETIME mtime, local;
SYSTEMTIME st;
sprintf(FilePath, "%s\\*.*", strpath);
HANDLE hFind = FindFirstFile(FilePath, &fd);
if (hFind == INVALID_HANDLE_VALUE)
return;
do
{
if (fd.cFileName[0] != '.')
{
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
sprintf(NewPath, "%s\\%s", strpath, fd.cFileName);
Findfiles(NewPath);
}
else
{
GetFileTime(hFind, NULL, NULL, &mtime);
FileTimeToLocalFileTime( &mtime, &local );
FileTimeToSystemTime(&local, &st);
CString time;
time.Format("%02d/%02d/%04d", st.wMonth, st.wDay, st.wYear);
AfxMessageBox(time);
}
}
}
while (FindNextFile(hFind, &fd));
FindClose(hFind);
But my file last modofied time is 9/5/2006. The Time always dispalyed as 12/24/18186. what is wrong?
Thanks a lot.
|
|
|
|
|
The members of the SYSTEMTIME structure are of type WORD . You need to change your format to
time.Format("%02hd/%02hd/%04hd", st.wMonth, st.wDay, st.wYear);
Software Zen: delete this;
|
|
|
|
|
I am upgrading a VS 2003 project to VS2005 that contains managed and unmanaged code. According to MS documentation and testing I can no longer build a release that statically links to the Runtime libraries. I have to use dynamic linking instead. That is OK, Im flexible. But how do I find which libraires I need to include in my installation for deployment and where on the target system do I install them? If anyne can point me in the right direction, I would appreciate it.
Craig
|
|
|
|
|
|
Thanks Jun for the suggestion. I already have the 2.0 framework installed on my test system. Still, it doesn't work. When I try to run the application I get a message "This application failed to start because the application configuration is incorrect". It does look as if the needed dll's are in the Global Assembly Cache, so maybe something else is up. I'll keep trying. Thanks again.
Craig
|
|
|
|