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

An error occurred while creating or opening the C++ browsing database file...

$
0
0

I am working on a C++ Win32 console application. Whenever I close the Visual Studio 2013 with the application open, I get the following error:

"An error occurred while creating or opening the C++ browsing database file C:\Users\[user]\Documents\Visual Studio 2013\Projects\StartingOutwCpp\StartingOutwCpp.sdf. IntelliSence and browsing information will not be available for C++ projects.

Ensure that Microsoft SQL Server Compact 4.0 is installed and that no other applications are accessing the file. If this problem persists, delete the file and reopen the solution."

And sure enough, the Intelisense is also not working, and the VS is running painfully slow as well. I made sure that Microsoft SQL Server Compact 4.0 is installed and that no other applications are accessing the file. I've deleted the file, still getting the error. I have also repaired and even re-installed VS, and tried creating a new project and moving the files from the old project over. Same error.

Note: This error is not generated when editing C# applications, only C++


Problem creating COM Add-In Using Visual Studio 2013 Ultimate Edition in C++

$
0
0

I've created dozens of C++ COM Add-Ins using Visual Studio 2010. However, 2013 will not let me get passed the following step.  When I  right click in the Class View and select "Implement Interface ..."  the following occurs:

1.  First the Wizard shows up.   I select "Microsoft Add-In Designer<1.0>"

2.  After selecting _IDTExtensibility2 interface I select Finish and get the following error
"An error occurred while setting the error info."


3.  After clicking "OK"  the following error appears
"Error in OnFinish: Failed to return new Code Element.  Possibly syntax error.  New Element Name: _IDTExtensibility2"


Are we still able to create simple COM Add-Ins in C++ Using Visual Studio 2013?

CMFCSpinButtonCtrl not showing horizontal arrow orientation in VS 2013

$
0
0

When I create a CMFCSpinButtonCtrl object with the UDS_HORZ style, the scroll arrows remain in the vertical orientation (using VS 2013). For example:

CMFCSpinButtonCtrl m_wndSpin;  //declared in header file

m_WndSpin->Create(WS_CHILD | WS_VISIBLE | UDS_ARROWKEYS | UDS_SETBUDDYINT | UDS_HORZ, rectSpin, this, ID_SPIN);

With this line of code in my OnInitialUpdate of my CView-derived class, the scroll button appears with the arrows in the up-down orientation, even though the UDS_HORZ should make them horizontal. When I use the CSpinButtonCtrl (non-MFC version), the arrow are correct.

Is there a work-around or fix for this bug?

No clang in visual studio 2015 RC

$
0
0

Hi,

I run on two computers (one is Windows 7 64 bit, the other is a vm windows 10) this version of visual studio. Consistently the clang tools are NOT installed.

I DID select everything when the installation started, it just does NOT do it.

Anyone seen this?

Thanks,

G.

DAO to ACEDAO upgrade in Visual C++ 6.0

$
0
0

Hi,

I'm new to Visual C++ and I have to modify an existing DLL built in VC++ 6.0.

It is using access 97 as its back end. I need to modify this to work with Access 2010.

I know that I have to add reference to acedao dll instead of dbdao.

Could anyone tell me the process for adding reference in Visual C++ 6.0?

Thanks

Jithesh

Embed executable in MFC container of tab type.

$
0
0

Hi,

There is a requirement to make container having 2-3 tabs and each tab corresponds to separate executable. So i need to embed these exe in each corresponding tab so that only one container UI can show other executables UI by clicking on each tab.

Regards,

Shashank

VS 2015 RC: MBCS for MFC

$
0
0
Where can I please download the Multibyte MFC Library for Visual Studio 2015 RC?

Which Visual C++ redistributable package needed for Visual Studio 2013 Update 3 and 4?

$
0
0

Which redistributable package should be installed at the client side for binaries built with either Visual C++ 2013 Update 3 or 4? 

From the Download Center, "Visual C++ Redistributable Packages for Visual Studio 2013",http://www.microsoft.com/en-us/download/details.aspx?id=40784 I downloaded "vcredist_x86.exe" and "vcredist_x64.exe", which have version number 12.0.21005.1

My system, which has installed VS2013 Update 3, also has "vcredist_x86.exe" and "vcredist_x64.exe", at "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033", but these having a higher version number: 12.0.30501.0

A colleague of mine has installed  VS2013 Update 4, but has the same redistributable files as my VS2013 Update 3 installation: version 12.0.30501.0.

Is it correct to conclude that

  1. the VS2013 redistributables at Microsoft's Download Center (12.0.21005.1) are outdated?
  2. VS2013 Update 3 and Update 4 based applications may share the very same redistributable package (12.0.30501.0)?



Wrong CListCtrl items drawing

$
0
0

I have my CListCtrlEx derived from CListCtrl. This list have style LVS_REPORT, LVS_OWNERDRAWFIXED and LVS_EX_GRIDLINES. I have added possibility to change font for this list. This works fine, but there is one bad thing - if I change font and before that I have not been scrolling list, then all list items redraws right, but if I have done scrolling before font changing, then list items redraws a little bit upper or lower than list grid horizontal lines, i. e. items text becomes overlapped by grid lines.

Here is how I changing list font:

LRESULT CListCtrlEx::OnSetFont(WPARAM wParam, LPARAM) { LRESULT res = Default(); CRect rc; GetWindowRect(&rc); WINDOWPOS wp; wp.hwnd = m_hWnd; wp.cx = rc.Width(); wp.cy = rc.Height(); wp.flags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER; SendMessage(WM_WINDOWPOSCHANGED, 0, (LPARAM)&wp); return res; } void CListCtrlEx::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct) { HDC hDC = ::GetDC(NULL); CFont* pFont = GetFont(); HFONT hFontOld = (HFONT)SelectObject(hDC, pFont->GetSafeHandle()); CRect rect; DrawText(hDC, _T(" "), 1, rect, DT_SINGLELINE | DT_CALCRECT); lpMeasureItemStruct->itemHeight = rect.bottom - rect.top; SelectObject(hDC, hFontOld); ::ReleaseDC(NULL, hDC); }

SelectClipRgn fails on some zoom factor (VC++ MFC)

$
0
0

After doing CreatePolygonRgn and SelectClipRgn, I draw a vector long enough to cover the polygon area --- pDC->MoveTo(p1) & LineTo(p2).

The p1 & p2 are adjusted each time based on the current zoom factor of the screen. As I zoom in using the mouse wheel, at some point, a piece of the line is broken and displaced on a wrong spot... That is, I see two lines.  This happens at some high zoom factor, and if I zoom out again, my line is OK with the proper clipping based on my polygon.  

This only happens on lines close to vertical (but not exactly 90 degrees), and only on some high zoom-in situation. As I pan the picture, the broken line lengths change.

I am re-drawing the line every time I zoom or pan, executing the same piece of code that sets the clip rgn, draw, and disable the clip by pDC->SelectClipRgn().

Is this a graphic card issue?  This problem does not happen in PC SAFE MODE run...

Thank you 
Makoto

This is an image of broken lines:

http://screencast.com/t/47mPbq3u0



Potential bug with VS 2015 RC, unresolved inline function

$
0
0

Hi, a few of us are trying to compile Google's protobuf library, and are having an unresolved inline function issue with the new VS 2015 community RC. The issue is described  at Protobuf's github page: https://github.com/google/protobuf/issues/240. Note that the compile error only occurs in release mode.

Thanks


Project compiles error with Platform Toolset setting to Visual Studio 2012 but compiles fine with Visual Studio 2010

$
0
0

I have converted a Visual Studio 2010 solution to Visual Studio 2012. Platform Toolset for all projects in the solution is automatically updated to Visual Studio 2012. Then I got “error C2248: 'CObject::CObject' : cannot access private member declared in class 'CObject'” from a CLR enabled project. The error was caused by a AFX_CLASS_EXPORT class:

class AFX_CLASS_EXPORT CMyList : public CList<int*, int*&>
{
...
}

I changed Platform Toolset for this project to Visual Studio 2010 and the project and solution built without problem.

Why do I have to use Visual Studio 2010 toolset to build this project? Isn’t this a problem for a develop environment without Visual Studio 2010?

I appreciate any advice and suggestion.

Y

Internet Explorer COM issues

$
0
0

Hello,

We've implemented a phone-home solution for one of our customers, more precisely: we've implemented the IWebBrowser2 interface in order to create a hidden instance of Internet Explorer (using CoCreateInstance) and we use this instance to communicate with our server through HTTP POST requests.

Locally, everything worked fine, but our customer has marked the server URL in his Internet settings as "Local Intranet". When the server's response is received, the handle to the interface pointer is lost, and the Internet Explorer instance suddenly becomes visible.
We've identified that a solution for this would be to mark the server URL as "Internet", but this is not an acceptable solution for our customer.

So, in this matter, could you please let us know the probable cause and a solution for achieving the desired functionality?
As a side note, I've also pasted below a code snippet containing the code used for launching the Internet Explorer using CoCreateInstance.

Please let me know your thoughts on this - thank you,
 
#include <Windows.h>
#include <string>
#include <Exdisp.h>
#include <MsHTML.h>
#include <iostream>

void Navigate(std::wstring);

int main()
{
    Navigate(L"www.google.com");
}

void Navigate(std::wstring serverURL)
{
    if (SUCCEEDED(OleInitialize(NULL)))
    {
        IWebBrowser2 *pBrowser2;

        CoCreateInstance(CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER, IID_IWebBrowser2, (void **)&pBrowser2);

        if (pBrowser2)
        {
            VARIANT vURL;
            VariantInit(&vURL);

            vURL.vt = VT_BSTR;
            vURL.bstrVal = SysAllocString(serverURL.c_str());

            IDispatch *disp = NULL;
            IHTMLDocument2 *htmlDoc = NULL;

            HRESULT hr = pBrowser2->Navigate2(&vURL, NULL, NULL, NULL, NULL);

				// Setting IE COM as hidden
            pBrowser2->put_Visible(VARIANT_FALSE); // if you need the IE shown, change parameter to VARIANT_TRUE

            if (SUCCEEDED(hr))
                std::cout << "Success", Sleep(5000);

            pBrowser2->Quit();
            pBrowser2->Release();

            VariantClear(&vURL);
        }

        OleUninitialize();
    }
}

why this my program breaking?

$
0
0
#include<iostream>
#include<conio.h>
using namespace std;




int fonk_topla(int a,int b);

int fonk_cik(int a,int b);



int main()
{

	cout<<"\tXXX BANKA HOSGELDINIZ\t"<<endl;
	cout<<"_______________________________________________________________________"<<endl;

	int para=0;

	int x=20;
	int a=10;

	char musteriad[12];
	char i;
	char musteriad1[12];
	char k;

	while (a<x)
	{


	int paracek,parayatir,n;
	int musterisifre,musterisifre1,secim,personelno=100,personelsifre=001,pno,ppass;

	int hesapno,musterino,islem,hesapno1,musterino1;

	cout<<"personel islemleri icin (1) musteri islemleri icin (2) yi secin"<<endl;
	cin>>secim;

	switch (secim)
	{

	case 1: cout<<"personel islemlerini secdiniz isleme devam etmek icin lutfen personel numarasi ve sifre giriniz"<<endl;
		cout<<"personel numara :"<<endl;
		cin>>pno;
		cout<<"personel sifre :"<<endl;
		cin>>ppass;
		if(personelno==pno && personelsifre==ppass){
			cout<<"sisteme giris yaptiniz"<<endl;
			cout<<"bankada kac musteri var : "<<endl;
			cin>>n;
			for(int i=1;i<=n;++i)
			{
				cout<<"musteri ad soyad: "<<endl;
				cin>>musteriad[i];
				cout<<"musteri sifre : "<<endl;
				cin>>musterisifre;
				cout<<"kayit yapildi"<<endl;
			}
		}
		else
		{
			cout<<"yanlis sifre veya numara"<<endl;
		}
		break;

	case 2: cout<<"musteri islemlerini sectiniz"<<endl;

		cout<<"musteri adinizi giriniz"<<endl;
		cin>>musteriad1[k];
		cout<<"musteri sifrenizi giriniz"<<endl;
		cin>>musterisifre1;
		if(musteriad[i]==musteriad1[k] && musterisifre==musterisifre1 ){

			cout<<"--------------------------------------------------------"<<endl;
		cout<<"islem sec 1 - hesap acma 2- para yatirma 3- para cekme 4-hesap ozeti 5- cikis: "<<endl;
		cin>>islem;

		switch (islem)
		{
		case 1 :cout<<"hesap acma"<<endl;
			cout<<"musteri no gir : ";
			cin>>musterino;
			cout<<"hesap no gir : ";
			cin>>hesapno;
			cout<<"tekrar musteri no gir : ";
			cin>>musterino1;
			cout<<"tekrar hesap no gir : ";
			cin>>hesapno1;
			if(musterino==musterino1 && hesapno==hesapno1){

				cout<<"hesap no : "<<hesapno<<endl;
			cout<<"musteri no: "<<musterino<<endl;
			cout<<"hesap basariyla acildi"<<endl;
			}
			else{
				cout<<"tekrar dene"<<endl;}
			break;
		case 2 :cout<<"para yatirma"<<endl;
			if(musterino==musterino1){
				cout<<"yatrilacak para miktari : "<<endl;
				cin>>parayatir;
				fonk_topla(parayatir,para);
			}
			else{
				a=a+100;}
			break;
		case 3 :cout<<"para cekme"<<endl;
			cout<<"cekilecek para miktari : "<<endl;
			cin>>paracek;
			fonk_cik(paracek,para);
			break;
		case 4 :cout<<"hesap ozeti"<<endl;

			//cout<<"toplam : "<<toplam<<endl;
			cout<<"hesap no : "<<hesapno<<endl;
			cout<<"musteri no: "<<musterino<<endl;
			cout<<"musteri ad soyad : "<<musteriad<<endl;
			break;

		case 5: cout<<"cikis yaptiniz"<<endl;
			a=a+100;
			break;
		default: cout<<"yanlis islem secdiniz"<<endl;
			break;

			//break;
		}
		}

		else{cout<<"yanlis kullanici adi tekrar deneyiniz kayit yaptirmadiysaniz personele basvurunuz!!"<<endl;}
	}
	}
		system("PAUSE");
		return 0;
	}

	int toplam;

	int fonk_topla(int a,int b)
	{
		toplam=a+b;
		cout<<"toplam : "<<toplam<<endl;
		return 0;
	}

	int fonk_cik(int a,int b)
	{
		toplam=a-b;
		cout<<"toplam : "<<toplam<<endl;
		return 0;
	}////////musteri isminde 1den fazla karakter girince hata veriyor!!  ve kaydolan musteriler musteri islemi yapamiyor
	/////2-para yatir  3-para cek islemlerinde toplami hesaplayamiyor 4-hesap detaylarinda toplami gostermiyor!!


Visual Studio 2013 MFC has compatibility issue

$
0
0

Hi.

I found that almost Visual Studio 2013 application has compatibility problem.

* environment

Windows 7 SP1

1. compile MFC application
2. set Windows 2000 compatibility mode.
3. execute it.
4. always they crash.

Windows 8.1

1. compile MFC application
2. set Windows XP compatibility mode.
3. edit with registry "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers". change "WINXPSP3" to "WIN2000"
4. execute it.
5. always they crash.

* reson

Plz see msvcr120.dll(v12.0.21005.1)

 SUB_L10026BF4:
  		push	ebp
  		mov	ebp,esp
  		sub	esp,0000012Ch
  		mov	eax,[L100DF7B8]
  		xor	eax,ebp
  		mov	[ebp-04h],eax
  		push	esi
  		lea	eax,[ebp-00000120h]
  		mov	dword ptr [ebp-00000120h],00000114h
  		push	eax
  		call	[KERNEL32.dll!GetVersionExW]
  		test	eax,eax
  		jz 	L100524B1
  		mov	eax,[ebp-0000011Ch]
  		push	00000006h
  		pop	esi
  		sub	eax,00000005h
  		jz 	L10052473 <-Check Windows NT 5.x / Jump label (1)
  		dec	eax
  		jnz	L10026C52
  		mov	eax,[ebp-00000118h]
  		sub	eax,00000000h
  		jz 	L10052464
  		dec	eax
  		jz 	L10052455
 L10026C52:
  		mov	[L100E03E4],esi
 L10026C58:
  		call	SUB_L10026B1C
  		cmp	[L100E03E4],esi
  		jl 	L10026C6A
  		call	SUB_L10026C80
 L10026C6A:
  		mov	ecx,[ebp-04h]
  		xor	ecx,ebp
  		pop	esi
  		call	SUB_L1000F7C6
  		mov	esp,ebp
  		pop	ebp
  		retn
 L10052473:
  		mov	eax,[ebp-00000118h] ;(1) load Minor version eax
  		sub	eax,00000000h
  		jz 	L100524AA           ;Check Windows NT 5.0 / Jump label (2)
  		dec	eax
  		jz 	L1005249D
  		dec	eax
  		jnz	L10052493
  		mov	dword ptr [L100E03E4],00000002h
  		jmp	L10026C6A
 L10052493:
  		mov	eax,[L100E03E4]
  		jmp	L10026C79
 L1005249D:
  		xor	eax,eax
  		inc	eax
  		mov	[L100E03E4],eax
  		jmp	L10026C79
 L100524AA:
  		and	dword ptr [L100E03E4],00000000h (2)
 L100524B1:
  		lea	ecx,[ebp-0000012Ch]
  		call	??0exception@std@@QAE@XZ
  		push	L100DCFD8
  		lea	eax,[ebp-0000012Ch]
  		mov	dword ptr [ebp-0000012Ch],L100677B4
  		push	eax
  		call	_CxxThrowException                 ; <- Always it crashes, when Win2000 compatibility mode. 

Why Visual Studio 2013 application is blocked with Windows 2000 Compatibility mode on Windows 7 and Win 8.1 ?

Media Player Classic which is compiled with VC++2013 has same issue .

* How to fix

L10052473:
 10052473  8B85E8FEFFFF         mov	eax,[ebp-00000118h]
 10052479  83E800               sub	eax,00000000h
 1005247C  742C                 jz 	L100524AA
 1005247E  48                   dec	eax
 1005247F  741C                 jz 	L1005249D
 10052481  48                   dec	eax
 10052482  750F                 jnz	L10052493
 10052484  C705E4030E1002000000 mov	dword ptr [L100E03E4],00000002h
 1005248E  E9D747FDFF           jmp	L10026C6A
Original
L10052473:
 10052473  8B85E8FEFFFF         mov	eax,[ebp-00000118h]
 10052479  83E800               sub	eax,00000000h 1005247C  741F                 jz 	L1005249D
 1005247E  48                   dec	eax
 1005247F  741C                 jz 	L1005249D
 10052481  48                   dec	eax
 10052482  750F                 jnz	L10052493
 10052484  C705E4030E1002000000 mov	dword ptr [L100E03E4],00000002h
 1005248E  E9D747FDFF           jmp	L10026C6A
Fixed



VS2015 RC vs VC 2013 PGO performance improves

$
0
0

The 2015 RC is NICE!

I have an all template file that uses complex<T>, vector<complex<T>> and some complex<T>*  to get rid of a level of indirect  access though vector<> that has various FFT implementations including spinning off threads for many of the severable functions. It works great and I've been pretty happy with the code optimization these days. I even coded direct complex operations to try to improve cache misses and generate faster performance with no improvement at all.

Running the code through the 2013 PGO reduced the full static build exe size about 10% but the 2013 version execution time was unchanged. However, running the 2015 RC PGO not only reduced the exe size but improved performance a surprising (to me) 15%.  In looking at the dissasm, the critical sections were significantly reduced with excellent use of the extended instruction set. The inner loop was shortened from 380 to about 270 bytes in length with rather lovely looking, extended instruction set code. It was a redo by the PGO since the code before the PGO was virtually identical.

I have a question about PogoSafeMose, an environment variable that determines whether the probes inserted into the program are thread safe or not.

Interestingly, the results were the same with and without setting the PogoSafeMode environment because I was using threads. Also the time taken to execute the training was the same. This was the case on both platforms. This was running the PGO through the VS menus so I wonder if they default to PogoSafeMode.

White Flicker after CombineRgn

$
0
0

It seems the flickering is generated by the CombineRgn function, but I really have no idea why this happens, since i've never used regions that much I'm possibly missing some knowledge on the matter.

Some events in the program triggers the addition of little rectangles to the main region, here's the code that handles that:

                        HRGN ActualRegion = CreateRectRgn(0, 0, 0, 0);
			GetWindowRgn(hwnd, ActualRegion);
			HRGN AddedRect = CreateRectRgn(//long code that creates a rectangle)
			CombineRgn(ActualRegion, ActualRegion, AddedRect, RGN_OR);

			SetWindowRgn(hwnd, ActualRegion, FALSE);
			InvalidateRect(hwnd, NULL, FALSE);

White Flickering appears only after the invalidation if new regions where combined to the main one.


Here's how I'm implementing double buffering in WM_PAINT:
PLEASE NOTE that on creation i'm enabling the DWM blur behind function with an invalid region (different from the Main one) which means that everything painted with BLACK_BRUSH will result in a 100% "invisible" portion of the program

                RECT r;	GetClientRect(hwnd, &r);

		PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps);
		HDC MemDc = CreateCompatibleDC(hdc);
		HBITMAP hBmp = CreateCompatibleBitmap(hdc, r.right, r.bottom);
		HBITMAP hOld = (HBITMAP)SelectObject(MemDc, hBmp);

		//Making sure this dc is filled with "invisible" pixels to display
		SelectObject(MemDc, GetStockObject(BLACK_BRUSH));
		Rectangle(MemDc, //arbitrary values that matches the entire screen);

		BitBlt(hdc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), MemDc, 0, 0, 		SRCCOPY);

		//clean-up
		SelectObject(MemDc, hOld);
		DeleteObject(hBmp);
		DeleteDC(MemDc);
		EndPaint(hwnd, &ps);

WM_ERASEBKGND obviously returns TRUE without further handling, the WNDCLASSEX instance of the window has a default BLACK_BRUSH as the hbrBackground field.

I also tried to intercept and return TRUE from WM_NCPAINT message.

I'm doing everything necessary to avoid intermediate drawcalls, everything handled inside the WM_PAINT uses a backbuffer, also i'd like to mention i'm not working with images/bitmaps. Everything is drawn with gdi/gdi+, and in no place i'm actually issuing a "white" redraw that may possibly cause said flicker. I'm a bit lost here

Is it something that i'm possibly missing ? I can't really understand what may be causing white flickering in this scenario

message::box error, windows form project.

$
0
0

Hi, here is code:

char* MyFunc() {.... }

MessageBox::Show(0, MyFunc(), MessageBoxButtons::OK, MessageBoxIcon::Warning);

Unable to build it,

error:

'System::Windows::Forms::MessageBox::Show' : none of the 21 overloads could convert all the argument types
1>          c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\system.windows.forms.dll: could be 'System::Windows::Forms::DialogResult System::Windows::Forms::MessageBox::Show(System::String ^,System::String ^,System::Windows::Forms::MessageBoxButtons,System::Windows::Forms::MessageBoxIcon)'
1>          c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\system.windows.forms.dll: or       'System::Windows::Forms::DialogResult System::Windows::Forms::MessageBox::Show(System::Windows::Forms::IWin32Window ^,System::String ^,System::String ^,System::Windows::Forms::MessageBoxButtons)'

Does anyone  know?

thanks...


Gennady Gurin

run as different user without prompt shellexecuteex

$
0
0

We are opening executable using ShellExecuteEx API. This executable runs in background and should not prompt for credentials(login,pwd).

SHELLEXECUTEINFO sei;
// Make sure to initialize all memory to zero.
ZeroMemory(&sei,sizeof(sei));

sei.cbSize = sizeof(sei);
//sei.fMask = SEE_MASK_NOCLOSEPROCESS; 
sei.hwnd = pWindow? pWindow->m_hWnd : NULL;
//if (SHELL_EXECUTE_VERB_MUST_NOT_USE == verb)
{
sei.lpVerb = NULL;
}
/*else
{
sei.lpVerb = L"open";
}*/
sei.lpFile = appOrDocument;

//if (EMPTY_STRING != appCmdLineParameter)
if(0 != _wcsicmp(appCmdLineParameter,EMPTY_STRING))
{
sei.lpParameters =  appCmdLineParameter;//this contains path of the executable and arguments
}
else
{
sei.lpParameters = NULL;
}
//sei.nShow = SW_SHOWNORMAL;
sei.hwnd = SW_HIDE;
sei.nShow = SW_HIDE;

ShellExecuteEx(&sei, dwErr);  

Is there any way to call executable by different credentials than windows login when we know only login name and not pwd.


shwetank

realloc not allocating additional memory

$
0
0

Hi,

I am using VS2012 32 bit and the cpp compiler. Windows 8.1, I have 16GB of RAM.

uiOK = realloc( uiOK, (uiMax * sizeof( UINT) ) )

uiMax is increased in 50k increments. uiOK returns NULL when uiMax is at 4,200,000

Sometimes it works, more often it does not. When it fails, 3.9GB are in use and 11.5GB are available. Anyone got any pointers as to what is going on? Any help appreciated.


 

Viewing all 15302 articles
Browse latest View live


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