Hi I want to secure the network data wich is send between a client and server. What's the best method to accomplish this? Like encryption algorithm, key exchanging etc. Thanks!
_Theo_
Posts
-
network data security -
Copying folders to another deviceUse the SHFileOperation function for easy copying.
-
Hook problemHi I'm using hooks to subclass menus so I can draw them myself. This works pretty good on Windows XP, but on 98 and 2000 it only seems to work once. When I have two different programs using the new style menus I can start up one of them over and over again without problems. But as soon as I click on a menu in another app using the menus it crashes. It only happens with a menu attached to a window. When using TrackPopupMenu it always seems to work. Any suggestions? Thanks
-
MPEG-1 length how?Here's some header info for the MPEG file format which should help you: 1-4 byte Sequence header In Hex 000001B3 12 bits Horizontal size In pixels 12 bits Vertical size In pixels 4 bits Pel aspect ratio 18 bits Picture rate Mind the difference between bits and bytes here. Only the sequence header is four whole bytes, the rest are all a certain amount of bits. The picture rate stands for a certain frame rate: 1 = 23.976 frames/sec 2 = 24 3 = 25 4 = 29.97 5 = 30 6 = 50 7 = 59.94 8 = 60
-
Ownerdraw menus and SetWindowsHookExHi I'm having some problems with using the
SetWindowsHookEx
function to intercept menu messages so I can draw the menu border myself when necessary. I've taken a look at sources of other ownerdraw menus already, but I'm still having problems. Could someone please explain me the procedure for setting up appropriate hooks so that I end up with menu message calls like WM_NCPAINT etc. Thanks in advance. -
size from HBITMAPUse
GetBitmapDimensionEx
to get the dimensions of the bitmap. -
color paletteUse the
ChooseColor
function to create a dialog box where you can pick a color. -
accessing union inside structSorry I didn't realise it's a predefined structure. Leaving DUMMYUNIONNAME seems to work, so instead of using it call the union attributes right away like:
//temp = dispName.DUMMYUNIONNAME.pol; temp = dispName.pol;
-
accessing union inside structUsing another union name than DUMMYUNIONNAME solves the problem.
-
Reading MessageBoxI don't think there are functions to do it that if you use MessageBox. But why do you want to do it anyway? You provide the label and text for a messagebox yourself so there's no need to read it.
-
Reading MessageBoxI'm not sure what you mean. Do you want to read the contents of an edit field in a dialog?
-
How do I completely clear a text file for re-use??You can use the
strftime
function to format a time/date string or you can useGetSystemTime
to get the current time and date from the system. -
MSN like Emoticon listYou have to create one by yourself, since there's no thing like a standard control for it. So you'll have to create your own source for it to handle everything like drawing etc.
-
active screensaver ProgrammaticallyYou can use
SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT,1,0,SPIF_SENDWININICHANGE);
to change the screensaver timeout thus triggering it after one second. Setting the timout to zero does not seem to work, so you'll have a minimum delay of one second. Don't forget to change the timeout back to a normal value when you're done ;) -
vc++ 4.0 and dllIf your square function has for example the following definition:
int square(int a,int b);
you could do it this way:typedef int (*proc)(int a,int b); HINSTANCE hLib; hLib = LoadLibrary("test_build.dll"); proc fptr=(proc)GetProcAddress(hLib,"square"); abc=fptr(1,2);
-
Create controls in a dll ?There's a OnDrawItem command. Maybe if you override that one you will receive ownerdraw messages. I never use MFC though so I'm not sure about this ;)
-
vc++ 4.0 and dllThere are two ways to do it: -link your testexe with a .lib file created when you compile the dll -use LoadLibrary and GetProcAddress to load the dll during execution of the test executable
-
paint a DCFirst of all, it's best to use BeginPaint and EndPaint when painting from the WM_PAINT message: PAINTSTRUCT ps; BeginPaint(hwnd,&ps); //you can use ps.hdc now for drawing EndPaint(hwnd,&ps); Otherwise use GetDC() when painting. The HDC object you have using the above methods can be used for drawing. A HDC object is 'connected' to a certain surface like a bitmap. The 'b' HDC object you use in your code points to nothing so to say, so you need to create a HBITMAP object if you want the code to work: HBITMAP bmp=CreateCompatibleBitmap(hdc,width,height); Then use SelectObject(b,bmp); to let 'b' point to the new bitmap. After that you can draw to it/copy to it etc. Also, I advice you use b=CreateCompatibleDC(hdc); instead of NULL as argument.
-
Real quick question...You can convert the wchar_t * to char * with one of the following functions: - wcstombs (include stdlib.h) - WideCharToMultiByte (include winnls.h)
-
Using C functions in Visual C++If you want to use C code or functions inside your C++ source files use the following: extern "C" { //C code or function calls here }