-
- Is this the right way to pin a pointer?
by daniel mark
- 3 Replies
- Last post
by Holger Grund
- Hello all:
I found the following code in a project and would like to know whether it is right to pin down a point as follows:
Code Snippet
// System::Array* topElli
float __gc* topPtr; // pin down a pointer for the destination array float sArrayTop __gc[]; sArrayTop= __try_cast<System::Single[]>(topElli); topPtr=&sArrayTop[0];
In my opinion, fl
-
- Collecting external dependencies
by troff
- 2 Replies
- Last post
by troff
- Hi everyone
I have a couple of projects that I move around different computers and that others also need to work with from time to time. It depends on a few external pieces of software, e.g. python.
What I would like is a simple way of packaging up the locations of these software packages, so that I can use $(PYTHON_HOME)\include, $(PYTHON_HOME)\Libs and the occasional $(PYTHON_SRC)\PCBuild8
-
- What can I do if CTreeCtrl::SetItemText returns FALSE?
by J Guy Davidson
- 6 Replies
- Last post
by Bite Qiu - MSFT
- The documentation tells me that CTreeCtrl::SetItemText can return nonzero if successful, zero otherwise. But if it is unsuccessful, is there anything I can do to find out why I'm getting crashes in my tree controls, and failed assertions on this function, so I want to see if those two facts are related.
Cheers,
Guy
-
- x64 application (VS 2005): error LNK2019: unresolved external symbol...
by john82
- 5 Replies
- Last post
by Simple Samples
- Hi:
I am writing an 32 bit application using VS 6.0, compile and running successfully. However, when I open the same application with VS 2005 (Team Suite), compile the same application as x64 application for target running on x64 platform, it give me some error messages related to error LNK2019.
I have changed the project properties -> configuration manager as x64, updated my own .lib fil
-
- How to save picturebox to a BMP!
by Alireza Noori
- 2 Replies
- Last post
by Alireza Noori
- Hi all,
I wanted to save the contents of a picturebox to a bmp file.
I just realized that the image class has a save function that saves the image to a file. But the question is how can I get the image from picturebox
I appreciate your help.
-
- VC++ Unicode/Multibuye oddity
by Miyabina
- 3 Replies
- Last post
by Sarath.
- When I try to compile a basic "Hello World" type program when using the default settings of "Use Unicode Character Set" in the solution property pages under configuration properties-general it will give me an error similar to -- main.cpp(39) : error C2664: 'DrawTextW' : cannot convert parameter 2 from 'char *' to 'LPCWSTR' -- but if i change it to "Use Multi-Byte Character
-
- "Goto Definition" sometimes doesn't work
by Jim Fr
- 3 Replies
- Last post
by Ayman Shoukry - MSFT
- In VS2005 SP1, "Goto Defintion" sometimes works fine, other times it takes me to the declaration, not the definition. Sometimes it brings up a long list of possible definitions for me to choose from (as versions previous to VS2005 would do) where there should be no reason to ask me. This is happening even on normal class method names. Sometimes deleting all target files including the .BC
-
- Impersonate user (seteuid/setegid for Windows)
by tanis15063
- 3 Replies
- Last post
by sushmsn
- Basically, I'm new to these forums, so I apologize if I am posting this to the wrong place. I am currently porting over code that was written for Linux that utilized the seteuid and setegid functions. These functions allow a high privileged user (root) to impersonate a user/group when trying to run certain system-level functions. Basically is there something like these functions that exist
-
- std::vector slow
by Gil Strauss
- 2 Replies
- Last post
by Andreas Masur
- Hello
I wrote a simple template class Vec and when I compile with optimization under Visual Studio 2005, std::vector takes almost twice as long. I would have thought that std::vector is much more optimized than anything I could roll myself. Am I mis-using std::vector somehow Or is it really that inefficient
What I did is basically 2^10 loops of allocating a vector<int> of size
-
- Problems trying to port code from Unix to MS VS 2005
by FelixP
- 1 Replies
- Last post
by UnitUniverse
- One of our users it running into problems porting his code from Unix to MS Windows using MS VS 2005. Any assistance would be greatly appreciated. His description of the problem is as follows.
We are porting code to MS Windows that was originally developed to run in Unix environments such as Linux, SGI, Solaris, ect. During this porting process, we have come across a very undesirable ano
-
- C++ after i have text file wrote
by Will_007
- 2 Replies
- Last post
by TySu
- Ive create a program in Visual C++ 2005 in conjunction with an RFID reader to write the tag string to a text file. At the moment i have this part finished - so i have a text file full of data that i need to update my database with.
As i have created all this in C++, i was wanting to know if anyone had any ideas how i could update my database (mySQL) with C++ preferabily, but all suggestions
-
- when including imapi.h, propidl.h errors on compiling VC++ 6.0
by josip cagalj
- 1 Replies
- Last post
by Sdi
- Hi all, i'm using IMAPIv1 to enable writing on CD and here is my problem: in some MyDialog.h I put '#include <imapi.h> #include <Imapierror.h>' so that I could declare e.g. 'IDiscMaster *pDiscMaster;' but when I try to compile I get several errors, e.g: 'c:\program files\microsoft sdk\include\propidl.h(216) : error C2011: 'tagCASCODE' : 'struct' type redefinition' I've download Feb200
-
- sxstrace error
by maburke
- 2 Replies
- Last post
by v1ctorong
- I'm getting a side-by-side error, and I'm trying to diagnose it with sxstrace, but sxstrace gives me an error: Z:\>sxstrace trace -logfile:blah.etl StartTrace failed. Error message is: Access is denied. I'm a member of the Administrators group on the computer, which is all I thought I needed to run sxstrace. What other super powers does my account need in order to run sxstrace Does the mach
-
- Abstract class object
by imanish11111
- 9 Replies
- Last post
by Vivek Ragunathan
- i hav read in all books dat we cant create object of abstract classes.. . and reasons like they are too abstract to create an object.. .. i want to know more of these reasons why we cant create objects...... . . . . manish
-
- Window handle become invalid after CreateThread()
by igneus
- 7 Replies
- Last post
by Simple Samples
- Hi all
I am writing a Win32 application using VS2005. I created a window within a Class in the main thread, then I pass this Class object in the CreateThread() function to create a new thread. In the new thread I tried to PostMessage to the window handle in that object, but it occurs error 1400 which is invalid window handle.. Could anyone please tell me what¡¯s happening here Why the window
-
- Test Placehold - Please Help!
by Gem Jams
- 2 Replies
- Last post
by Gem Jams
- Hi All,
I was wondering wheather you could help me with a query.
Can anybody help me with finding out what a Test Placehold is
I would be very greatful if you could leave me any information regarding this or tell me where i would be able to find more information on this.
Thanks
Gemma
-
- assigning derived class from base class declaration
by Steve Jackson
- 9 Replies
- Last post
by Steve Jackson
- Hello;
For the following code, know that Poodle is a derived class of Dog, and that aPoodle is an instanciation of Poodle.
In the code below, I would expect dogObject to become a pointer to aPoodle, but it doesn't seem to work for me. Instead, dogObject seems to only maintain the attributes of dog.
Any idea what I may be doing wrong
___________________________________________________
-
- U might change this
by farming
- 2 Replies
- Last post
by Chirag
- Hi, My keyboard, mouse, and camera, are all connected to my computer by USB interface. However, it shows no USB devices when I use function "SetupDiEnumDeviceInterfaces()". My code is listed as following: //look up devide of HID HDEVINFO hDevInfo = SetupDiGetClassDevs(&guidHID,NULL,0, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE); //look up interface of USB SP_DEVICE_INTERFACE_DATA
-
- from 'unsigned char *pBitmap' to 'System::Drawing::Bitmap^'
by Snip
- 2 Replies
- Last post
by Feng Chen - MSFT
- I have an unmanaged library which grabs an image from a camera. This image is placed in pBitmap (unsigned char *).
In managed vc++ I want to convert this pBitmap to a .NET Bitmap.
Can anybody help me
I tried the following
System::IntPtr ip;
GCHandle gcTemp;
gcTemp = GCHandle::Alloc(*pBitmap,GCHandleType:: Pinned);
ip=gcTemp.AddrOfPinnedObject();
System:: Drawing::Bi
-
- Conversion of eVC++ 4.0 to VS 2005
by Noobie and Newbie
- 3 Replies
- Last post
by suresh_vaidhya
- Hi guys, I am trying to convert code from eVC++ 4.0 to VS2005 (VC++). After the conversion, I got this error <code> fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds </code> So i go to Project -> Properties -> Configuration Properties -> C++ -> code generation -> Runtime Library from Multi-threaded (/MT ) to Multi-threaded Debug DLL (/MDd) http://
-
- How do I compile for Windows 95 using Visual Studio 2005
by Steve Wolf
- 3 Replies
- Last post
by Ted.
- I have an app that we recently migrated from VS2003.NET to VS2005. It is a standard unmanaged MFC app. It worked under windows 95 before migrating, but fails to load now due to the fact that IsDebuggerPresent() is not available in Kernel32.dll under Windows 95. My code doesn't call this thing. Rather, some aspect of ATL does (we use MFC, which appears to be merged with ATL these days).
I found
-
- Converting a user defined reference integer type into an integer to pass into a function
by iterationx
- 5 Replies
- Last post
by Nishant Sivakumar
- Hi I'm trying to call a managed function from unmanaged code using a delegate. I found some example code here : http://www.codeproject.com/managedcpp/unmanaged_to_managed.asp And this thread gives tips on how to convert it to VStudio 2005 / .NET http://www.codeproject.com/managedcpp/unmanaged_to_managed.asp df=100&tid=1343606&forumid=164784&select=1881892#xx1881892xx It seems elementar
-
- adding member functions
by Andrew Linzey
- 6 Replies
- Last post
by Bite Qiu - MSFT
- I'm new to vc++ 2005 express. I've created a class in an empty win32 consol project,. the on line help says I should be able to right click the class and select 'add member function'. the menu I'm getting has 'got to definition', 'go to declaration' but no 'add meber function' . Do I have to configure something in IDE to to get thios to work
-Andy
-
- Best way to keep BMPs showing properly when the display DPI is changed?
by Jeff Sholl
- 1 Replies
- Last post
by crescens2k
- Every time I try my program on a computer with the display DPI settings set to Large my BMPs that are in dialog boxes are no longer in the proper positions since the dlg is enlarged around them. Is there any way to display them so the BMPs still look good
-
- Pressing enter in multiline edit box presses the default button!?!?
by dillydadally
- 2 Replies
- Last post
by Simple Samples
- Hi, I have a multiline text box that the user will need to press enter in to go to the next line; however, everytime I press enter in the text box it clicks the ok button instead of going to the next line. I purposely left no default button so this wouldn't happen, but for some reason, the moment I press tab to go to the next text box the ok button becomes the default button again! How can I stop