Hello
I have succesfully implemented the bonjour sdk in a visual c++ console app. but when I am trying to implement the same code in a windows forms app (visual c++) I am receiving weird errors probably related to some local heap problem with the bonjour dll.
The following assertion in the file dbgheap.c fails:
/*
* If this ASSERT f...
i don't get any errors when i compiile my game the only problem is that it won't apply the texture it will apply a color, i know it is werid. like if texture has two colors white and red than white will be applied.
here is my code
// Monopoly.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "Monopoly.h...
I'm writing some code which stores some data structures in a special named binary section. These are all instances of the same struct which are scattered across many C files and are not within scope of each other. By placing them all in the named section I can iterate over all of them.
In GCC, I use _attribute_((section(...)) plus some ...
I'm currently implementing a copy constructor for a Linked List class. When I create a new instance of the class with another Linked List as a parameter, the constructor is being called for the object I'm passing as the parameter. This is leaving me confused beyond belief. Here is the section necessary to understand what's going on in th...
ok i got everything working. the texture only applys for two sides only of the cube the other sides won't display the correct texture.
here is my code
// Monopoly.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "Monopoly.h"
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; ...
How to convert a char[256] to wstring?
update. here is my current code:
char testDest[256];
char *p= _com_util::ConvertBSTRToString(url->bstrVal);
for (int i = 0; i <= strlen(p); i++)
{
testDest[i] = p[i];
}
// need to convert testDest to wstring to I can pass it to this below function...
writeToFile(testDestwstring);
...
The program below crashes when I build it in Release x64 (all other configurations run fine).
Am I doing it wrong or is it an OpenMP issue?
Well-grounded workarounds are highly appreciated.
To reproduce build a project (console application) with the code below.
Build with /openmp and /GL and (/O1 or /O2 or /Ox) options in Release x64 c...
does anyone have a simple example on how to use the bonjour sdk with a windows visual c++ form application or a general gui application? as far as i know apple provides examples only for c sharp, java and vb
thanks a lot for any help
...
I have a map file generated with microsoft visual studio. It contains a relatively big area named __NULL_IMPORT_DESCRIPTOR. What is this good for? It has something to do with linked dlls but I cannot figure out the exact purpose of it.
...
I have an IFilter written in Delphi that I'm trying to get working under 64 bit Windows 7 Desktop Search.
Due to it being developed in Delphi I can only compile this as a 32 Bit DLL.
To work around this I am trying to write a 64bit IFilter Dll in Visual C++ which internally uses my 32Bit IFilter Com Object using the DllSurogate techn...
I'm having the following code:
CMainFrame* pFrame = new CMainFrame;
if (!pFrame)
return FALSE;
m_pMainWnd = pFrame;
// create and load the frame with its resources
pFrame->LoadFrame(IDR_APP_MAINFRAME,
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
NULL);
// The one and only window has been initialized, so show and update it
pFr...
I am currently using this function inside my program.
void CBar::DocumentComplete(IDispatch *pDisp, VARIANT *URL)
How to make the BSTR value inside URL->bstrVal available for the whole program? I need to access the url value from other function.
...
Recently we found a "good way" to comment out lines of code by using continue:
for(int i=0; i<MAX_NUM; i++){
....
.... //--> about 30 lines of code
continue;
....//--> there is about 30 lines of code after continue
....
}
I scratch my head by asking why the previous developer put the continue keyword inside the intensive loo...
I have a native Visual C++ NT service. When the service is started its thread calls CoInitialize() which attaches the thread to an STA - the service thread uses MSXML through COM interfaces.
When the service receives SERVICE_CONTROL_STOP it posts a message in the message queue, then later that message is retrieved and the OnStop() handl...
I am looking for good resources for learning to use the Win32/GDI APIs or whatever supercedes it to draw and paint directly using the Win32 API to a glass form.
While I am using Delphi, I tagged this as Delphi or Visual C++. Any code samples and articles that you can find would be appreciated. MSDN articles do not seem to be written a...
I am having problems with a stringstream object. My class has an input stream as a member.
I am checking if obj->istream and after thatn if obj->istream->good().
The stream exists but the call to good() crashes. I am in Visual Studio 2005. Any clue?
How do I reset an istream?
if (soap->is) {
if (soap->is->good())
return so...
I am playing around with a small MFC-wizard-generated application, in Visual C++ 2010, and I just decided to put my own bitmap into the resources to replace the three-cubes MFC bitmap that shows up in the ribbon UI Application Button, aka the "marble".
The original appeared to use black (0,0,0) as a transparency color, but I am unable t...
I am trying to run a project in Visual Studio 2010, and for some reason it seems like I can't... the command-line window is closed instantly and the debug info is the following:
'exercise01.exe': Loaded 'E:\e\work spaces\C++ projects\exercise01\Debug\exercise01.exe', Symbols loaded.
'exercise01.exe': Loaded 'C:\WINDOWS\system32\ntdll.dl...
Hello,
I need to understand just 1 single instruction and accordingly I need to generify the things.
I need to pass structures (Objects of User Defined Data Types) at runtime using following assembly code.
Where Following is User Defined Data Type namely WESContext :
typedef struct CWESContext
{
BSTR UserName;
BSTR Mach...
Is there a way to tell the compiler to inline wherever it sees it to be useful? I thought it did this by default, but adding a few inline to my game loop functions improved performance by a good 30%.
Thanks
...