-
- using ExpectedException with C++
by kaye551082
- 2 Replies
- Last post
by Bite Qiu - MSFT
- hello. I saw this sample code in C# unit testing (VS2005) and I want to use it in C++ unit testing. Will this be possible I tried using it in my unit test codes but I think C++ does not seem to recognize the nam e ExpectedException. Here is the code in C# sample: using Microsoft.VisualStudio.TestTools.UnitTesting; using MyCSNamespace; namespace MyCSTestProject { [TestClass()] public clas
-
- Get the device form a hwnd
by NightCreature
- 5 Replies
- Last post
by Ramkrishna Pawar
- I need to know if it is possible to get the device from a hwnd. Or if the application is running in a multi monitir setup is the device you get from EnumDisplayDevices always the correct device
-
- Errors when sending between client and server, help me!
by ENTRO33
- 1 Replies
- Last post
by Ayman Shoukry - MSFT
- Hi,
My server sends the command to my client, PDA (Window Mobile 5)
Here is the code from server:
char command[2]={"K","M"};
send(socket, command, 2,0);
The code quoted in PDA at its Asynchronous Socket:
Char msg[2] ;
y=receive(msg, 2, 0);
Then msg I received is some quite strange. It supposed to be K and M, but I receive some others such
-
- CreateBitmap help needed
by LittleTrouble
- 1 Replies
- Last post
by Ayman Shoukry - MSFT
- Hi! I need help to understand and solve a CreateBitmap problem I have. I have tried many different combinations and ideas, but none of them works. Here is what I try to do:
1. I have bitmap data in ARGB format retrieved and stored here:
UINT32 *bmpBuffer; 2. I try to create 32 bits bitmap calling these functions:
HBITMAP bmp; bmp = CreateBitmap(Width, Height, 1, 32, (LPVOID*) bmpBuffe
-
- 'DisplayMat' : cannot convert parameter 1 from 'int [6][6]' to 'int *[]'
by Student_I
- 4 Replies
- Last post
by Student_I
- Hi. this is a sample of my problem. what should I do thanks.
#include "stdio.h" #include "stdlib.h" #define _Row 6 #define _Col 6
void DisplayMat(int *Mat[]);
void main() { int Matrix[_Row][_Col] = { { 11,0 ,13,0 ,0 ,0 }, { 21,22,0 ,24,0 ,0 }, { 0 ,32,33,0 ,35,0 }, { 0 ,0 ,43,44,0 ,46}, { 51,0 ,0 ,54,55,0 }, &nb
-
- Why does VS rebuild all projects again when we start to debug?
by ATLFalc_Paul
- 6 Replies
- Last post
by Simple Samples
- Hello everyone,
We have about 10 projects in our solution and obviously the rebuild of the solution takes some time. The problem I have with Visual Studio is that if I make a change to a project file(code change) rebuild the solution and then say "Start Debug" the whole solution rebuilds again for the second time even though it was built a second ago and no change has been made to the
-
- C3409 error on native C code
by John Mairs
- 1 Replies
- Last post
by John Mairs
- Hi,
C3409 empty attribute block is not allowed
I'm porting a project from VS2003 to VS2005. The following code compiled and ran fine in 2003. Note this is straight C code not C++. CLR support is turned off.
// global arrays
int foobar[][2] = { {0x41, 0x42}, {0x51, 0x52.....to about 200 entries
// macro
#define isa(u, CHAR_CLASS) u_in_ranges(u, CHAR_CLASS, size
-
- Race condition between reference copy local and post build events
by Adam Robillard
- 2 Replies
- Last post
by Adam Robillard
- Hi,
I have been seeing some strange behavior since the conversion of vs2003 to vs2005 with a few projects with managed C++. I have a solution with several projects within. The last project to be compiled has assembly references to some of the other projects as well as other dll's elsewhere. I have a postbuild event that must copy certain dll's around and it seems as though the "copy lo
-
- How do I disable deprecation in VC++ Express Edition?
by kurtangle
- 2 Replies
- Last post
by kurtangle
- Hi everyone, How do you disable the deprecation check in VC++ Express Edition Below is what I'm trying to do:
Code Snippet
warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. How/where do I use _CRT_SECURE_NO_WARNINGS I'm looking into using strcpy_s at
-
- [Help] Out of Memory
by Pogolin
- 9 Replies
- Last post
by Pogolin
- Hi all,
Recently, I have encountered a problem and I tried to debug it. I found that system throw out a CMemoryException when I try to allocate 256MB memory.
I have a member function in one class . see the below list.
ClassA:ClassA()
{
...
mImage = NULL;
...
}
ClassA:~ClassA()
{
delete []mImage;
}
bool ClassA : FuncA()
{
...
try {
unsign
-
- To read time and date of the system
by Suman#SS
- 5 Replies
- Last post
by John Sudds - MSFT
- I am writing a program for digitising the bank accounts.i need to read date and time of the system and calculate the difference with the date of account opening(which will be taken from the user).To calculate the interest and so-on.how to read date and time of the user.i came to know that there is a header file "time.h" and "date.h" !....... is it true ... if so how to get the
-
- unexpected behavior with find_first_of
by Anjo Gasa
- 1 Replies
- Last post
by Viorel.
- I require specifically formatted text for some output logs. One requirement is no padding on exponent fields ( E-002 vs. E-02). I simply call find_first_of("E-0"), and use the resultant index to paste together two substrings. I have found what seems to be random behavior with find_first_of. Consider the following program that illustrates it. I generate some random num
-
- problem with yahoo
by sspence
- 1 Replies
- Last post
by Marius Bancila
- I am receiving a runtime error stating: Program:C:\Progra^\Yahoo!\messen^\ypager.exe, runtime has been asked to terminate this program in an unusua way - what does this mean
-
- How do you take a c++ file and publish it to a .exe file?
by BobL4944973
- 3 Replies
- Last post
by Simple Samples
- How do you take a c++ file and publish it to a .exe file
-
- How to know the Number of Bytes allocated to a Pointer.
by Mahesh B. Mane
- 3 Replies
- Last post
by Mahesh B. Mane
- Hi Friends.....
Is there any function to know the number of bytes allocated to a pointer.
Ex:
foo()
{
int *intList = NULL;
intLIst = (int *)malloc(sizeof(int) * 10);
freeList(intList);
}
freeList(int *intList)
{
/*How to collect the total number of bytes allocated for intList*/
free(intList);
}
Thanks....
-
- ActiveX problem
by rbickert
- 8 Replies
- Last post
by rbickert
- I have been writing an activex control for quite a while and have gotten it to compile successfully. Only thing is, when I open in the activex control container, I get an empy oval shape that can be adjusted, and when the properties button is clicked, I get an Assert error. When I debug it, I am sent into ctlcore.cpp and pointed to the line:
if (SUCCEEDED(hr = GetTypeInfoOfGuid(0, *m_piid
-
- Calling a function from a DLL - couterintuitive
by iterationx
- 14 Replies
- Last post
by Nishant Sivakumar
- Hi This is a bit tricky, so I thought I'd ask before I get too deep. I'm building a DLL in C++ that will be called by a VB program. The DLL is an unmanaged to managed wrapper. I call unmanaged functions in VB with the DLL - no problem. The problem is the unmanaged C++ receives data from a socket that needs to get to the VB program. So I need to do two things 1) Have the unmanaged C++ call a manag
-
- Deprecated functions & ANSI C
by LHarper
- 1 Replies
- Last post
by Bite Qiu - MSFT
- I am converting an older (VC++ 6.0) dll to the VS2005 environment and am receiving warnings about deprecated functions.
1. Are the suggested functions (strcat_s for example) ANSI C Compliant
2. When will the functions (strcat for example) no longer be supported
Thanks.
-
- thread status in C runtime library
by Randy Seedle
- 2 Replies
- Last post
by Alex Cohn
- Does anyone know how to get status information on a thread created using the C runtime library
Randy
-
- problem solved thanks so much
by iterationx
- 14 Replies
- Last post
by Nishant Sivakumar
- Hi This is a bit tricky, so I thought I'd ask before I get too deep. I'm building a DLL in C++ that will be called by a VB program. The DLL is an unmanaged to managed wrapper. I call unmanaged functions in VB with the DLL - no problem. The problem is the unmanaged C++ receives data from a socket that needs to get to the VB program. So I need to do two things 1) Have the unmanaged C++ call a manag
-
- Changing character encoding changes appearance of dialog buttons
by Sternoceral
- 14 Replies
- Last post
by einaros
- I've changed my character encoding from unicode to multibyte, which has changed the appearance of form buttons from an aesthetically pleasing, windows xp style "round edge" to an aesthetically unpleasing windows 95 style "square edge". How can I change character encoding without changing the appearance of buttons Thanks in advance
-
- Proper OOP documentation
by NeederOfVBHelp
- 2 Replies
- Last post
by NeederOfVBHelp
- I am making a class library; to insure flexiblity and proper technique, I inherited the main class from an interface. The main class does not add any addition public members. My question is should I document the interface or the main class
-
- Media player GUI
by abhishek_6023
- 3 Replies
- Last post
by Brian Kramer
- Is it possible to create skin of a media player using VC++ 6.0 If possible how
-
- how to resolve the linking error
by Situ
- 1 Replies
- Last post
by einaros
- nresolved external symbol "public: virtual __thiscall CConfigDBDetailsPage::~CConfigDBDetailsPage(void)" ( 1CConfigDBDetailsPage@@UAE@XZ) referenced in function "public: virtual long __stdcall CoEConnect::XEConnectFour::GetImpersonationInfo(int,int,wchar_t * *,wchar_t * *,wchar_t * *,int *)" ( GetImpersonationInfo@XEConnectFour@CoEConnect@@UAGJHHPAPA_W00PAH@Z)
-
- Issues with template classes and constructors in VC++
by mgio
- 11 Replies
- Last post
by mgio
- The following code won't compile and it isn't clear to me why:
/******************************************************************************/
// NullType: Used to signify the end of a list
/******************************************************************************/
// This is from Modern C++ Design
class NullType {};
/*********************************************