Quantcast
Channel: Visual C forum
Viewing all 15302 articles
Browse latest View live

Every Project I make fails to build with an "object reference not set to instance of object" error

$
0
0

I've decided to start learning C++ and since I'm already familiar with Visual Studio 2017 for sake of C#, I decided to stick with it for C++.

Unfortunately, every single project I make fails to build with the output window displaying:

1>------ Build started: Project: TestTwo, Configuration: Debug Win32 ------
1>Object reference not set to an instance of an object.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

This particular project began as an Empty C++ Project, and is a basic "Hello World" program.
Below is the entirety of the code, which is all contained in the Main.cpp file, the only file in the entire solution aside from the default external dependencies.

#include <iostream>

int main()
{
	std::cout << "Hello World!" << std::endl;
	std::cin.get();
}
It's not this project alone, either. Even if I make a new console project and make no edits whatsoever to the project, I get the same error.

The error list is completely empty as well, offering no greater insight as to what the issue is. At this point, I've been banging my head against this for hours and am completely stumped. Any help would be appreciated.





Correct way to use Direct2D and mfc ?

$
0
0

I'm developing a desktop application in c ++ and mfc, I need to create a stock chart using direct2d in a resizable window.
The problem is how to correctly implement the direct2d in mfc, I have seen that there are two ways one through the library d2d1.lib d2d1.h
while the second one with the CD2D classes of mfc, it seems to me that the second one is more optimal!
I have not found many examples! is there any example in mfc?
I would need an example of how to resize a rectangle through the right mouse button in a window!
Thank you!

Customizing Text Value for a Group CMFCPropertyGridProperty

$
0
0

I have a group CMFCPropertyGridProperty property.  Its sub-properties are all simple boolean properties with names like "Option A", "Option B", etc. The values for those Sub-properties are all "true" or "false".

I would like to customize the text Value for the Group property such that instead of it saying "true, true, false, true", etc., it instead lists the options which are true.  In this example it would have the text "A, B, D".

To that end I created a class derived from CMFCPropertyGridProperty and overrode the virtual function "FormatProperty()". It successfully causes the Group Property value to be set to the required text.

However, when I click on that value, it gets screwy.  The "OnUpdateValue()" virtual function for the group property is called, and it tries to compare the string value "A, B, D" with the values in the sub-properties (which are "true","false" etc.) - obviously finds a mismatch, and updates the values of those sub-properties, which in turn updates the value of the group property to some incorrect value. This all happens even with the Group Property set to AllowEdit(false).

So my question is - how can I do what I want?  Successfully customize the text value for a Group property without the problem descibed above?

Thanks,
--Steve

Slow C++ code execution

$
0
0

Hello Can anyone say why this code took to execute ~30minutes, I have played with compiler settings and code was executed in 2 minutes, I cant remember what I just did

Code below:

// sampleC.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <algorithm>
#include <vector>
#include <chrono>
#include <cmath>
#include <numeric> // iota

using namespace std;
using namespace chrono;
using Clock = chrono::steady_clock;
using Int = uint64_t;

struct Node {
	Int payload; // ignored; just for plausability.
	Node* next = nullptr;
};

static_assert(sizeof(Node) == 16, "Not 64-bit? That's OK too.");

double time(Int N, Int iters)
{
	vector<Node> memory(N);
	vector<Node*> nodes(N);
	for (Int i = 0; i < N; ++i) {
		nodes[i] = &memory[i];
	}
	std::random_shuffle(begin(nodes), end(nodes));

	// Link up the nodes:
	for (Int i = 0; i < N - 1; ++i) {
		nodes[i]->next = nodes[i + 1];
	}

	Node* start_node = nodes[0];

	nodes.clear();
	nodes.shrink_to_fit(); // Free up unused memory before meassuring:

	// Do the actual measurements:

	auto start = Clock::now();

	for (Int it = 0; it < iters; ++it) {
		// Run through all the nodes:
		Node* node = start_node;
		while (node)
		{
			node = node->next;
		}
	}

	auto dur = Clock::now() - start;
	auto ns = duration_cast<nanoseconds>(dur).count();
	return ns / double(N * iters);
}

int main()
{

	double avg = 0;
	cout << "#bytes    ns/elem" << endl;

	try 
	{
		Int stopsPerFactor = 4; // For every power of 2, how many measurements do we do?
		Int minElemensFactor = 6;  // First measurement is 2^this number of elements.
		Int maxElemsFactor = 30; // Last measurement is 2^this number of elements. 30 == 16GB of memory

		Int min = stopsPerFactor * minElemensFactor;
		Int max = stopsPerFactor * maxElemsFactor;

		for (Int ei = min; ei <= max; ++ei) 
		{
			Int N = (Int)round(pow(2.0, double(ei) / stopsPerFactor));
			//Int reps = elemsPerMeasure / N;
			Int reps = (Int)round(2e10 / pow(N, 1.5));
			if (reps < 1) reps = 1;
			auto ans = time(N, reps);
			avg = avg + ans;
			cout << (N * sizeof(Node)) << "   " << ans << "   # (N=" << N << ", reps=" << reps << ") " << (ei - min + 1) << "/" << (max - min + 1) << endl;
		}
		cout << avg / max << endl;
	}
	catch (exception& e) 
	{
		cout << "# stopped due to exception: " << e.what() << endl;
	}
	return 0;
}

Compiler settings:

What did I do wrong in compiler settings?

VS 2017 .RC file - Error RC1015 cannot open include file 'afxres.h'

$
0
0

Hi Folks:

   Last night, while trying to get VS 2015 to use the Windows 10 SDK, I managed to mess up the IDE to the point where a fresh install sounded like a good idea. 

   I went to MS's VS Community site for the latest download.  2017 is now the default offered version, so I downloaded and installed it.

   The compilation failed.  The only error found is in the .RC file: 

/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

   Nothing was found when I searched for the header file on the C: drive. 

   Commenting out the include caused other errors. 

   Suggestions?

      Thanks
      Larry


Start OSK with CreateProcess an Windows 10 64 Bit fails

$
0
0

Hello,

I'm porting my Windows 7 Win32 C-programmed application to Windows 10. When user inputs are needed, the on screen keyboard osk has to be started by my application. This worked without problem on Windows 7.

This is done with CreateProcess(NULL, szOnScreenKeyboardExe, NULL, NULL, FALSE, 0, NULL, NULL, &sa, &procInfo);.

I'm not sure if the problem is caused by Windows 10 or by the 64 bit version of the OS. I've only W7-32 and W10-64 available here for testing.

With Explorer I can navigate to

  • C:\Windows\System32 and start osk successfully
  • C:\Windows\SysWOW64 and can NOT start osk (Message Box "... cannot be started ...")

With Explorer I can navigate to the 64 and 32 bit system folders mentioned above and can start 64 and 32 Bit applications like calc and cmd.

  • System32\cmd can start System32\OSK, but not SysWOW64\osk
  • SysWOW64\cmd can't start osk neither in System32 nor SysWOW64
    (Now I know that system file system redirection redirects a 32 bit process accessing system32 to SysWOW64)

So I used Wow64DisableWow64FsRedirection in my application to be able to start programs in the System32 folder, as the 32 bit version of osk seemed to be not working.

The Result is: I can start 32 and 64 bit versions of calc, notepad, cmd, but NOT osk.

Very strange: The 64 bit cmd, which is started by my application, can also not start osk, whereas the 64 bit cmd started by explorer can start osk.

To clarify the situation: CreateProcess for osk succeeds, but the osk just shows a message box "... cannot be started ...." and/or crashes.

An now the question: How to call CreateProcess to start the osk? Explorer can do it, a cmd started by explorer can do it, my application can't do it.

Thank you for any hint.

 

IHTMLElementCollection cannot read all html elements

$
0
0

I have a SDI app, with CView based on CHtmlView. But I cannot read all html elements through IHTMLElementCollection, on this site:

void CTestAutoView::OnInitialUpdate()
{
	CHtmlView::OnInitialUpdate();

	SetSilent(TRUE);
	Navigate2(_T("https://www.autoatu.ro"), NULL, NULL);
}


and here is the code where I am trying to read all elements:

void CTestAutoView::OnNavigateComplete2(LPCTSTR strURL)
{
	// TODO: Add your specialized code here and/or call the base class

	CHtmlView::OnNavigateComplete2(strURL);

	IHTMLDocument2* pHtmlDoc = NULL;

	// Retrieve the document object.
	IDispatch* pHtmlDocDispatch = GetHtmlDocument();
	if (pHtmlDocDispatch != NULL)
	{
		HRESULT hr = pHtmlDocDispatch->QueryInterface(IID_IHTMLDocument2, (void**)&pHtmlDoc);
		if(SUCCEEDED(hr) && NULL != pHtmlDoc)
		{
			IHTMLElementCollection* pColl = NULL;
			hr = pHtmlDoc->get_all(&pColl);
			if(SUCCEEDED(hr) && NULL != pColl)
			{
				long nLength = 0;
				pColl->get_length(&nLength);

				for(int i = 0;i < nLength;++i)
				{
					COleVariant vIdx((long)i, VT_I4);

					IDispatch* pElemDispatch = NULL;
					IHTMLElement* pElem = NULL;

					hr = pColl->item(vIdx, vIdx, &pElemDispatch);

					if(SUCCEEDED(hr) && NULL != pElemDispatch)
					{
						hr = pElemDispatch->QueryInterface(IID_IHTMLElement, (void**)&pElem);

						if(SUCCEEDED(hr) && NULL != pElem)
						{
							BSTR bstrTagName;
							CString sTempTagName;
							if (! FAILED(pElem->get_tagName(&bstrTagName)))
							{
								sTempTagName = bstrTagName;
								SysFreeString(bstrTagName);
							}
							TRACE(">>>>>>>>%S\n", sTempTagName);
						}
					}
				}
			}
		}
	}
}

the only tags that is read it by the code from above is:

>>>>>>>>!
>>>>>>>>HTML
>>>>>>>>HEAD
>>>>>>>>TITLE
>>>>>>>>META
>>>>>>>>META
>>>>>>>>META
>>>>>>>>META
>>>>>>>>META
>>>>>>>>SCRIPT

which is not normal, the site has a lot of html tags. Why IHTMLElementCollection cannot read all tags ? I attach here a sample project which reveal the issue (VS2010):

TestAuto VS2010 project




Play any sound thru microphone


Debugger Not Hitting Breakpoints in Native C++ Dll

$
0
0

I have a native C++ dll that I need to debug (.NET 2010).  It is being called from an executable I don't have the source code for.  The dll needs to be located in a specific directory not under my project's folders.  After I start the debugger for the dll, and attach to the executable, I have the exe call my dll.  The dll appears to get called properly, but it seems perhaps I'm not attached to the dll it's calling.  What I get in the debugger is the hollow breakpoint with an exclamation point with the message, "The breakpoint will not currently be hit.  No executable code is associated with this line.  Possible causes include: preprocessor directives or compiler/linker optimizations."

As near as I can tell, I have my project properties for debugging set up correctly based on this article:

http://msdn.microsoft.com/en-us/library/kcw4dzyf%28v=vs.80%29.aspx

What could I be missing here?  Does it have anything to do with the exe, dll, and dll project files all being in different locations?  Am I not attaching to the correct dll somehow?

Problems creating COM event handler

$
0
0

I have been able to successfully invoke functions in a COM interface.  But I continue to struggle with creating an event handler for the same COM object.

My code contains the following import statement:

#import "LogosCOM.tlb"

And this .tlb file was created from the .exe file which contains the COM object.  The import creates 2 files - logoscom.tli and logoscom.tlh - which provides the interface and the header file definitions, respectively.

In the .tlh file, I find the following:

struct __declspec(uuid("d80579b0-eb69-4217-a170-f0bec30b2672"))
ILogosApplicationEvents : IDispatch
{
   // Methods:
   HRESULT PanelOpened(IDispatch *Panel);
   HRESULT PanelActivated(IDispatch *Panel);
   HRESULT PanelChanged(IDispatch *Panel, IDispatch* Hint);
   HRESULT PanelClosed(IDispatch * Panel);
   HRESULT Exiting();
};

I want my program to handle the "PanelChanged" event.

I set things up in my C++ code based on this online documentation:
https://docs.microsoft.com/en-us/cpp/cpp/event-handling-in-native-cpp

I tried following the example, and got 95% of the way there, but ran into one small(?) error...  Here's the relevant code I created:

[event_receiver(native)]
class CEventReceiver
{
public:
    void OnLogosPanelChanged(IDispatch * Panel, IDispatch * Hint)
    {
        printf_s("OnLogosPanelChanged was called.\n");
    }

    void hookEvent(Logos4Lib::ILogosApplicationEvents *pEventSource)
    {
        __hook(&Logos4Lib::ILogosApplicationEvents::PanelChanged, pEventSource,&CEventReceiver::OnLogosPanelChanged);
    }

    void unhookEvent(Logos4Lib::ILogosApplicationEvents *pEventSource)
    {
        __unhook(&Logos4Lib::ILogosApplicationEvents::PanelChanged, pEventSource,&CEventReceiver::OnLogosPanelChanged);
    }
};

OnLogosPanelChanged() is the callback function.  The hookEvent() method tells the COM object to use this callback function to handle the specified event.

Then I put this code elsewhere in my program (where I set up the connection to the COM object):

    Logos4Lib::ILogosApplicationEvents eventSource;
    CEventReceiver eventReceiver;
    eventReceiver.hookEvent(&eventSource);

The IDE flags an error on the declaration of eventSource:  "error C2259: 'Logos4Lib::ILogosApplicationEvents': cannot instantiate abstract class".

I'm not sure why this is abstract, given its definition above.  When I try to compile, I get more error messages:

linklogos.cpp(39): warning C4467: usage of ATL attributes is deprecated

This relates to the line:

[event_receiver(native)]

linklogos.cpp(50): error C3723: 'Logos4Lib::ILogosApplicationEvents::PanelChanged':could not resolve event
logoscom.tli(113): note: see declaration of 'Logos4Lib::ILogosApplicationEvents::PanelChanged'
linklogos.cpp(50): note: The event handler is one of:
linklogos.cpp(50): note: could be 'void CEventReceiver::OnLogosPanelChanged(IDispatch *,IDispatch* )'
linklogos.cpp(50): note: There are no events:
logoscom.tli(113): note:     'HRESULT Logos4Lib::ILogosApplicationEvents::PanelChanged(IDispatch *,IDispatch* )':is not an event

This error relates to the line:

    __hook(&Logos4Lib::ILogosApplicationEvents::PanelChanged, pEventSource,&CEventReceiver::OnLogosPanelChanged);


linklogos.cpp(56): error C3723: 'Logos4Lib::ILogosApplicationEvents::PanelChanged':could not resolve event
logoscom.tli(113): note: see declaration of 'Logos4Lib::ILogosApplicationEvents::PanelChanged'
linklogos.cpp(56): note: The event handler is one of:
linklogos.cpp(56): note: could be 'void CEventReceiver::OnLogosPanelChanged(IDispatch *,IDispatch* )'
linklogos.cpp(56): note: There are no events:
logoscom.tli(113): note:     'HRESULT Logos4Lib::ILogosApplicationEvents::PanelChanged(IDispatch *,IDispatch* )':is not an event

This error relates to the line:

    __unhook(&Logos4Lib::ILogosApplicationEvents::PanelChanged, pEventSource,&CEventReceiver::OnLogosPanelChanged);


linklogos.cpp(75): error C2259: 'Logos4Lib::ILogosApplicationEvents': cannot instantiate abstract class
linklogos.cpp(75): note: due to following members:
linklogos.cpp(75): note: 'HRESULT IUnknown::QueryInterface(const IID &,void **)':is abstract
c:\program files (x86)\windows kits\10\include\10.0.16299.0\um\unknwnbase.h(113): note: see declaration of 'IUnknown::QueryInterface'
linklogos.cpp(75): note: 'ULONG IUnknown::AddRef(void)': is abstract
c:\program files (x86)\windows kits\10\include\10.0.16299.0\um\unknwnbase.h(117): note: see declaration of 'IUnknown::AddRef'
linklogos.cpp(75): note: 'ULONG IUnknown::Release(void)': is abstract
c:\program files (x86)\windows kits\10\include\10.0.16299.0\um\unknwnbase.h(119): note: see declaration of 'IUnknown::Release'
linklogos.cpp(75): note: 'HRESULT IDispatch::GetTypeInfoCount(UINT *)': is abstract
c:\program files (x86)\windows kits\10\include\10.0.16299.0\um\oaidl.h(2204): note: see declaration of 'IDispatch::GetTypeInfoCount'
linklogos.cpp(75): note: 'HRESULT IDispatch::GetTypeInfo(UINT,LCID,ITypeInfo **)':is abstract
c:\program files (x86)\windows kits\10\include\10.0.16299.0\um\oaidl.h(2207): note: see declaration of 'IDispatch::GetTypeInfo'
linklogos.cpp(75): note: 'HRESULT IDispatch::GetIDsOfNames(const IID &,LPOLESTR *,UINT,LCID,DISPID* )':is abstract
c:\program files (x86)\windows kits\10\include\10.0.16299.0\um\oaidl.h(2212): note: see declaration of 'IDispatch::GetIDsOfNames'
linklogos.cpp(75): note: 'HRESULT IDispatch::Invoke(DISPID,const IID &,LCID,WORD,DISPPARAMS *,VARIANT* ,EXCEPINFO *,UINT* )':is abstract
c:\program files (x86)\windows kits\10\include\10.0.16299.0\um\oaidl.h(2219): note: see declaration of 'IDispatch::Invoke'

This error relates to the line:

    Logos4Lib::ILogosApplicationEvents eventSource;


The first error message is perhaps the most troubling...  Any ideas?

icon panel not showing in proprieties in C++ visual studio

$
0
0

i can't find the icon browser into proprieties menu ?

because in C# it's shown normally but when o choose c++ project CLR i cant see the place that can i change the icon from !!! 

 

CDialog ScrollBar

$
0
0

Hi,

In my MFC dialog application I am using CMFCTabCtrl.

I am having a dialog in one of the tab page. In that dialog I am displaying multiple child dialogs dynamically.The contents of dialog exceeds the dialog's client area. The dialog which has tab control is resizable dialog.

Now I added scroll bar to the dialog of tab page.

Now my problem is after scrolling to some position If I resize the dialog or maximize or minimize the dialog, the client are is not getting scrolled up to top.

The mousewheel and scrolling bar operation are working fine.

Below is my code 

void CMyDlg::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
{
	// TODO: Add your message handler code here and/or call default.
  	int nDelta;
  	int nMaxPos = m_rect.Height() - m_nCurHeight;

  	switch (nSBCode)
  	{
  	case SB_LINEDOWN:
  		if (m_nScrollPos >= nMaxPos)
  			return;
  		nDelta = min(nMaxPos/20,nMaxPos-m_nScrollPos);
  		break;

  	case SB_LINEUP:
  		if (m_nScrollPos <= 0)
  			return;
  		nDelta = -min(nMaxPos/20,m_nScrollPos);
  		break;

           case SB_PAGEDOWN:
  		if (m_nScrollPos >= nMaxPos)
  			return;
  		nDelta = min(nMaxPos/10,nMaxPos-m_nScrollPos);
  		break;

  	case SB_THUMB  		nDelta = (int)nPos - m_nScrollPos;
  		break;

  	case SB_PAGEUP:
  		if (m_nScrollPos <= 0)
  			return;
  		nDelta = -min(nMaxPos/10,m_nScrollPos);
  		break;
           default:
  		return;
  	}
  	m_nScrollPos += nDelta;
  	SetScrollPos(SB_VERT,m_nScrollPos,TRUE);
  	ScrollWindow(0,-nDelta);
  	CDialog::OnVScroll(nSBCode, nPos, pScrollBar);

}
void CMyDlg::OnSize(UINT nType, int cx, int cy) 
  {
  	CDialog::OnSize(nType, cx, cy);
  	m_nCurHeight = cy;
  	SCROLLINFO si;
  	si.cbSize = sizeof(SCROLLINFO);
  	si.fMask = SIF_ALL; // SIF_ALL = SIF_PAGE | SIF_RANGE | SIF_POS;
  	si.nMin = 0;
	si.nMax = m_rect.Height();
	si.nPage = cy;
  	si.nPos = 0;
        SetScrollInfo(SB_VERT, &si, TRUE);
	Invalidate(TRUE);
  }
BOOL CMyDlg::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
{
	int nMaxPos = m_rect.Height() - m_nCurHeight;
	if (zDelta<0)
	{
		if (m_nScrollPos < nMaxPos)
		{
			zDelta = min(max(nMaxPos/20,5),nMaxPos-m_nScrollPos);

			m_nScrollPos += zDelta;
			SetScrollPos(SB_VERT,m_nScrollPos,TRUE);
			ScrollWindow(0,-zDelta);
		}
	}
	else
	{
		if (m_nScrollPos > 0)
		{
			zDelta = -min(max(nMaxPos/20,5),m_nScrollPos);

			m_nScrollPos += zDelta;
			SetScrollPos(SB_VERT,m_nScrollPos,TRUE);
			ScrollWindow(0,-zDelta);
		}
	}
	return CDialog::OnMouseWheel(nFlags, zDelta, pt);
}

Here m_rect is sum of size of all the child dialogs which are diaplayed(it means the contents size) not the dialog's client area.

Images

Now I scrolled to some position.

Now I maximized , but the child dialog with text implicit msg1 is missing.

Now I minimized , now also the child dialog with text implicit msg1 is missing in the dialog.


How to create array of objects in Visual Studio C++

$
0
0

I have a class contains settings parameters. I want to create an array of this parameters.

This is the class:

ref class Global_Params_Struct
 {
  public:

           ...parameters

public:

          ... methods

}

In class 'Form1':

public ref class Form1 : public System::Windows::Forms::Form
 {

     public:
               Form1(void)
              {
                   for(Byte i = 0; i < 10; i++)
                        this->Global_Params_Array[i] = gcnew Global_Params_Struct;
              }

     private: array<Global_Params_Struct^>^       Global_Params_Array;

}

This code is compiled correctly, but an exception arises due to the internal line of the 'for' loop:

System.NullReferenceException: 'Object reference not set to an instance of an object.'

How should I create an array of 'Global_Params_Struct' class?

Convert the bitmap image (>1 bit) to monochrome bitmap image (1 bit) in MFC

$
0
0

Hi, I'm creating a MFC project (C++ language) to save the bitmap into a ROM of a device.

The bitmap file will be loaded from the PC and path name will be recorded. I would like the application to detect the bit depth of the bitmap loaded (if equal to 1 bit, nothing change and perform the process;else convert the bit depth to 1 bit before perform the process).

Is there any way I can do to achieve the above purpose?

Appreciate the help!Thanks!!


Convert table cell format into excel

$
0
0
Programmatically, how do I convert the table cell height and width from another package that creates tables in mm to excel? Also, how do I prevent excel from hiding columns and/or rows? I want to open it up and see my converted table in exactly the same way I saw it in my previous application.

In Visual Studio 2017, OnInitDialog isn't called for a a class derived from CPrintDialog if the default selected printer is "Microsoft print to PDF"

$
0
0

Hi there,

Create a simple MFC project made with Visual Studio 2017. Insert a brakpoint in CDialog::OnInitDialog in file dlgcore.cpp ( "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\atlmfc\src\mfc\dlgcore.cpp)

Run the application, go to  File/Print Setup, the breakpoint will be hit; press go and select as current printer "Microsoft print to PDF" from the ComboBox and press ok. Go again to File?Print Setup, the print setup dialog is displayed but the the breakpoint will not be hit.

Best regards,

Sfetan Virgil Voinea

How to load a GIF image from resource using GDI+?

$
0
0

I've tried the approach described in this link to load a GIF image from a resource ID, but only the first frame is displayed.

I check the number of frames with the code below, it is always 1 frame, but actually the GIF has 2 frames.

UINT count = m_pImage->GetFrameDimensionsCount();

I guess there might be somethng wrong with loading the GIF from resource. Could you please let me know how to load it correctly?

Thanks in advance.

Microsoft Visual C++ 2017 Runtime not installing properly

$
0
0

Hey, so I've been through the ringer with this problem. Here's the thing; Visual c++ 2017 runtime will not install properly. I've uninstalled it and every iota of data associated with it. Reinstalled: didnt work. Uninstalled every prior instance of Visual C++  back to 2005. Reinstalled everything. Each instance installed properly, until I hit 2017, where it continued to be a pain in the butt. I've tried registering it, didn't work either. Each time it tells me the program is unavailable on my network. I'm tired of yelling "I'm installing it, you *&$# program, of course you can't find it" at my computer, . If there is anyone who knows any other way to fix this blockade in my work flow, I'd love to hear it.

Here's the log for when the program takes a poop on my carpet.

[3648:940C][2018-08-24T16:19:53]i001: Burn v3.7.3813.0, Windows v10.0 (Build 17134: Service Pack 0), path: C:\Users\gknoo\Downloads\vc_redist.x86.exe, cmdline: ''
[3648:940C][2018-08-24T16:19:53]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\gknoo\AppData\Local\Temp\dd_vcredist_x86_20180824161953.log'
[3648:940C][2018-08-24T16:19:53]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\gknoo\Downloads\vc_redist.x86.exe'
[3648:940C][2018-08-24T16:19:53]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Users\gknoo\Downloads\'
[3648:940C][2018-08-24T16:19:53]i000: Setting string variable 'WixBundleName' to value 'Microsoft Visual C++ 2017 Redistributable (x86) - 14.15.26706'
[3648:940C][2018-08-24T16:19:54]i100: Detect begin, 10 packages
[3648:940C][2018-08-24T16:19:54]i000: Setting version variable 'windows_uCRT_DetectKey' to value '10.0.17134.191'
[3648:940C][2018-08-24T16:19:54]i000: Setting numeric variable 'windows_uCRT_DetectKeyExists' to value 1
[3648:940C][2018-08-24T16:19:54]i052: Condition '(VersionNT = v6.3 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[3648:940C][2018-08-24T16:19:54]i052: Condition '(VersionNT = v6.3 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[3648:940C][2018-08-24T16:19:54]i052: Condition '(VersionNT = v6.2 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[3648:940C][2018-08-24T16:19:54]i052: Condition '(VersionNT = v6.2 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[3648:940C][2018-08-24T16:19:54]i052: Condition '(VersionNT = v6.1 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[3648:940C][2018-08-24T16:19:54]i052: Condition '(VersionNT = v6.1 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[3648:940C][2018-08-24T16:19:54]i052: Condition '(VersionNT = v6.0 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[3648:940C][2018-08-24T16:19:54]i052: Condition '(VersionNT = v6.0 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[3648:940C][2018-08-24T16:19:54]i103: Detected related package: {BBF2AC74-720C-3CB3-8291-5E34039232FA}, scope: PerMachine, version: 14.0.24215.0, language: 0 operation: MajorUpgrade
[3648:940C][2018-08-24T16:19:54]i103: Detected related package: {69BCE4AC-9572-3271-A2FB-9423BDA36A43}, scope: PerMachine, version: 14.0.24215.0, language: 0 operation: MajorUpgrade
[3648:940C][2018-08-24T16:19:54]i101: Detected package: Windows81_x86, state: Absent, cached: None
[3648:940C][2018-08-24T16:19:54]i101: Detected package: Windows81_x64, state: Absent, cached: None
[3648:940C][2018-08-24T16:19:54]i101: Detected package: Windows8_x86, state: Absent, cached: None
[3648:940C][2018-08-24T16:19:54]i101: Detected package: Windows8_x64, state: Absent, cached: None
[3648:940C][2018-08-24T16:19:54]i101: Detected package: Windows7_MSU_x86, state: Absent, cached: None
[3648:940C][2018-08-24T16:19:54]i101: Detected package: Windows7_MSU_x64, state: Absent, cached: None
[3648:940C][2018-08-24T16:19:54]i101: Detected package: WindowsVista_MSU_x86, state: Absent, cached: None
[3648:940C][2018-08-24T16:19:54]i101: Detected package: WindowsVista_MSU_x64, state: Absent, cached: None
[3648:940C][2018-08-24T16:19:54]i101: Detected package: vcRuntimeMinimum_x86, state: Absent, cached: Complete
[3648:940C][2018-08-24T16:19:54]i101: Detected package: vcRuntimeAdditional_x86, state: Absent, cached: Complete
[3648:940C][2018-08-24T16:19:54]i052: Condition 'VersionNT >= v6.0 OR (VersionNT = v5.1 AND ServicePackLevel >= 2) OR (VersionNT = v5.2 AND ServicePackLevel >= 1)' evaluates to true.
[3648:940C][2018-08-24T16:19:54]i199: Detect complete, result: 0x0
[3648:940C][2018-08-24T16:19:55]i200: Plan begin, 10 packages, action: Install
[3648:940C][2018-08-24T16:19:55]i052: Condition 'VersionNT = v6.3 AND NOT VersionNT64' evaluates to false.
[3648:940C][2018-08-24T16:19:55]w321: Skipping dependency registration on package with no dependency providers: Windows81_x86
[3648:940C][2018-08-24T16:19:55]i052: Condition 'VersionNT = v6.3 AND VersionNT64' evaluates to false.
[3648:940C][2018-08-24T16:19:55]w321: Skipping dependency registration on package with no dependency providers: Windows81_x64
[3648:940C][2018-08-24T16:19:55]i052: Condition 'VersionNT = v6.2 AND NOT VersionNT64' evaluates to false.
[3648:940C][2018-08-24T16:19:55]w321: Skipping dependency registration on package with no dependency providers: Windows8_x86
[3648:940C][2018-08-24T16:19:55]i052: Condition 'VersionNT = v6.2 AND VersionNT64' evaluates to false.
[3648:940C][2018-08-24T16:19:55]w321: Skipping dependency registration on package with no dependency providers: Windows8_x64
[3648:940C][2018-08-24T16:19:55]i052: Condition 'VersionNT = v6.1 AND NOT VersionNT64' evaluates to false.
[3648:940C][2018-08-24T16:19:55]w321: Skipping dependency registration on package with no dependency providers: Windows7_MSU_x86
[3648:940C][2018-08-24T16:19:55]i052: Condition 'VersionNT = v6.1 AND VersionNT64' evaluates to false.
[3648:940C][2018-08-24T16:19:55]w321: Skipping dependency registration on package with no dependency providers: Windows7_MSU_x64
[3648:940C][2018-08-24T16:19:55]i052: Condition 'VersionNT = v6.0 AND NOT VersionNT64' evaluates to false.
[3648:940C][2018-08-24T16:19:55]w321: Skipping dependency registration on package with no dependency providers: WindowsVista_MSU_x86
[3648:940C][2018-08-24T16:19:55]i052: Condition 'VersionNT = v6.0 AND VersionNT64' evaluates to false.
[3648:940C][2018-08-24T16:19:55]w321: Skipping dependency registration on package with no dependency providers: WindowsVista_MSU_x64
[3648:940C][2018-08-24T16:19:55]i000: Setting string variable 'WixBundleRollbackLog_vcRuntimeMinimum_x86' to value 'C:\Users\gknoo\AppData\Local\Temp\dd_vcredist_x86_20180824161953_000_vcRuntimeMinimum_x86_rollback.log'
[3648:940C][2018-08-24T16:19:55]i000: Setting string variable 'WixBundleLog_vcRuntimeMinimum_x86' to value 'C:\Users\gknoo\AppData\Local\Temp\dd_vcredist_x86_20180824161953_000_vcRuntimeMinimum_x86.log'
[3648:940C][2018-08-24T16:19:55]i000: Setting string variable 'WixBundleRollbackLog_vcRuntimeAdditional_x86' to value 'C:\Users\gknoo\AppData\Local\Temp\dd_vcredist_x86_20180824161953_001_vcRuntimeAdditional_x86_rollback.log'
[3648:940C][2018-08-24T16:19:55]i000: Setting string variable 'WixBundleLog_vcRuntimeAdditional_x86' to value 'C:\Users\gknoo\AppData\Local\Temp\dd_vcredist_x86_20180824161953_001_vcRuntimeAdditional_x86.log'
[3648:940C][2018-08-24T16:19:55]i201: Planned package: Windows81_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[3648:940C][2018-08-24T16:19:55]i201: Planned package: Windows81_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[3648:940C][2018-08-24T16:19:55]i201: Planned package: Windows8_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[3648:940C][2018-08-24T16:19:55]i201: Planned package: Windows8_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[3648:940C][2018-08-24T16:19:55]i201: Planned package: Windows7_MSU_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[3648:940C][2018-08-24T16:19:55]i201: Planned package: Windows7_MSU_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[3648:940C][2018-08-24T16:19:55]i201: Planned package: WindowsVista_MSU_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[3648:940C][2018-08-24T16:19:55]i201: Planned package: WindowsVista_MSU_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[3648:940C][2018-08-24T16:19:55]i201: Planned package: vcRuntimeMinimum_x86, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: No, uncache: No, dependency: Register
[3648:940C][2018-08-24T16:19:55]i201: Planned package: vcRuntimeAdditional_x86, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: No, uncache: No, dependency: Register
[3648:940C][2018-08-24T16:19:55]i299: Plan complete, result: 0x0
[3648:940C][2018-08-24T16:19:55]i300: Apply begin
[71FC:8988][2018-08-24T16:19:57]i360: Creating a system restore point.
[71FC:8988][2018-08-24T16:19:58]i361: Created a system restore point.
[71FC:8988][2018-08-24T16:19:58]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7e9fae12-5bbf-47fb-b944-09c49e75c061}, options: 0x7, disable resume: No
[71FC:8988][2018-08-24T16:19:58]i000: Caching bundle from: 'C:\Users\gknoo\AppData\Local\Temp\{7e9fae12-5bbf-47fb-b944-09c49e75c061}\.be\VC_redist.x86.exe' to: 'C:\ProgramData\Package Cache\{7e9fae12-5bbf-47fb-b944-09c49e75c061}\VC_redist.x86.exe'
[71FC:8988][2018-08-24T16:19:58]i320: Registering bundle dependency provider: ,,x86,14.0,bundle, version: 14.15.26706.0
[71FC:8988][2018-08-24T16:19:58]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7e9fae12-5bbf-47fb-b944-09c49e75c061}, resume: Active, restart initiated: No, disable resume: No
[71FC:9EC0][2018-08-24T16:19:58]i304: Verified existing payload: vcRuntimeMinimum_x86 at path: C:\ProgramData\Package Cache\{39E15475-23F2-345D-8977-B5DC47A94E26}v14.15.26706\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi.
[71FC:9EC0][2018-08-24T16:19:58]i304: Verified existing payload: cab54A5CABBE7274D8A22EB58060AAB7623 at path: C:\ProgramData\Package Cache\{39E15475-23F2-345D-8977-B5DC47A94E26}v14.15.26706\packages\vcRuntimeMinimum_x86\cab1.cab.
[71FC:9EC0][2018-08-24T16:19:58]i304: Verified existing payload: vcRuntimeAdditional_x86 at path: C:\ProgramData\Package Cache\{2757496A-3E74-320A-B007-36120A9F126D}v14.15.26706\packages\vcRuntimeAdditional_x86\vc_runtimeAdditional_x86.msi.
[71FC:9EC0][2018-08-24T16:19:58]i304: Verified existing payload: cabB3E1576D1FEFBB979E13B1A5379E0B16 at path: C:\ProgramData\Package Cache\{2757496A-3E74-320A-B007-36120A9F126D}v14.15.26706\packages\vcRuntimeAdditional_x86\cab1.cab.
[71FC:8988][2018-08-24T16:19:58]i301: Applying execute package: vcRuntimeMinimum_x86, action: Install, path: C:\ProgramData\Package Cache\{39E15475-23F2-345D-8977-B5DC47A94E26}v14.15.26706\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi, arguments: ' MSIFASTINSTALL="7" NOVSUI="1"'
[71FC:8988][2018-08-24T16:22:44]e000: Error 0x80070643: Failed to install MSI package.
[71FC:8988][2018-08-24T16:22:44]e000: Error 0x80070643: Failed to execute MSI package.
[3648:940C][2018-08-24T16:22:44]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[3648:940C][2018-08-24T16:22:44]i319: Applied execute package: vcRuntimeMinimum_x86, result: 0x80070643, restart: None
[3648:940C][2018-08-24T16:22:44]e000: Error 0x80070643: Failed to execute MSI package.
[71FC:8988][2018-08-24T16:22:44]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7e9fae12-5bbf-47fb-b944-09c49e75c061}, resume: None, restart: None, disable resume: No
[71FC:8988][2018-08-24T16:22:44]i330: Removed bundle dependency provider: ,,x86,14.0,bundle
[71FC:8988][2018-08-24T16:22:44]i352: Removing cached bundle: {7e9fae12-5bbf-47fb-b944-09c49e75c061}, from path: C:\ProgramData\Package Cache\{7e9fae12-5bbf-47fb-b944-09c49e75c061}\
[71FC:8988][2018-08-24T16:22:44]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7e9fae12-5bbf-47fb-b944-09c49e75c061}, resume: None, restart initiated: No, disable resume: No
[3648:940C][2018-08-24T16:22:45]i399: Apply complete, result: 0x80070643, restart: None, ba requested restart:  No

CD2D wrapper MFC will be ok for realtime graph ?

$
0
0

is the CD2D wrapper for direct2d in MFC sufficiently robust to develop a realtime graph?
at the base I would have to feed it with data coming from the network and it would have to constantly update itself according to the needs quickly or less, impacts as little as possible on the CPU and going to exploit the GPU!
In addition I should open more than one chart at the same time about six on a monitor and 6 on a second monitor.
Thanks


LNK2001 error when compiling in IDE or NMAKE VS2017

$
0
0

I'm upgrading a C++/C solution from VS2010 to VS2017. I have one project (from old MS ctl3d code base) that does not want to link. It does when I use the old .mak file but not using the project in the IDE or NMAKE. (Yes, we maintain 3 ways of compiling.) I get a linker error LNK2001 on the dllEntryPoint and also a .exp error LNK2001: unresolved external symbol on all of the functions that should be exposed.

The only changes in the .vcxproj file are the changes needed for ToolsVersion PlatformToolset and the additional WindowsTargetPlatformVersion. But I did these same changes with all 377 other projects without issues. 

I used dumpbin on the .exp and it is virtually the same as the 2010 version. I also tried adding the .obj files to the Additional Dependencies. Although it produced warnings later, it did create the .dll. Unfortunately it didn't work correctly. 

The project was fine with VS2010. I cannot figure out what I need to do to fix this issue.

Thanks in advance to your help.

Viewing all 15302 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>