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

Loading Visual Studio 6 code with Visual Studio 2013 Migration Warning

$
0
0

When I load an old Visual Studio 6 program to Visual Studio 2013, this message is displayed, "Visual Studio needs to make non-functional changes to this project in order to enable the project to open in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without impacting project behavior."

What changes need to be made?


bhs67


Calling a function from CreateProcess [MSVE 2013 for windows desktop][VC++ project]

$
0
0

Hi All,

         I went through the createprocess function documentation on MSDN website.

however i could not find a way to call a function using createprocess. Here are brief details of what i am trying to do

1.  main process [a running program itself is a main process]. i am running a program in MSVE  2013 for windows desktop.

2. that main process receives user inputs via CMDLINE.

3. main process is a simple program waiting for  user input commands and spawn a process [i.e. createprocess]. Assume display prompt something like  [=main=>].

4. say i issue command A , B and C.

5. Based on input A, program need to createprocess on existing .exe [executable] and it is up and running. 

6. Based on input B, program need to invoke a function. please note this function B has its own cmdline interface  [=CMD=>] and that  [=CMD=>] need to intake arguments [since it is now a seperate PROCESS, i expect it to act on its own] and be able to receive inputs via [ [=CMD=>]] and then call a function. please note my function B has inbuilt PROMPT capability.

7.  similar like step 6, i want same functionality for step 7 as well [i.e. input C]. prompt is something like =C=>. function C is here. please note my function C has inbuilt PROMPT capability.

objective at the end: - 

=main=> will take inputs A and then run a executable

=CMD=> will take inputs B and should act independently run a executable and simultaneously take inputs from different prompt

=C=> will take inputs B and should act independently run a executable and simultaneously take inputs from different prompt

now questions,

1. How can i link or hook a function to createprocess function.

2. please note my functionality can change within the 6 and 7, so i CANNOT afford to make function B as an executable and function C as an executable and call them as cmdline

3. can i use createprocess within a function called by createthread() ??

4. basically, when i create a process, i need to trigger a callback function

Thanks

RC Reddy


Unexpected Error C2632: 'char' followed by 'char' is illegal

$
0
0

I am having a piece of code as 

typedef unsigned char   _uint8;
typedef unsigned short  _uint16;
typedef unsigned int    _uint32;
typedef float           _float32;

typedef char            _int8;
typedef short           _int16;
typedef int             _int32;

I'm getting error at the lines that are in italics

The error message is 

error C2632: 'char' followed by 'char' is illegal
error C2632: 'short' followed by 'short' is illegal
error C2632: 'int' followed by 'int' is illegal

How can I use VS2015 command-line tools (cl, link) to build a C++/CLI DLL which targets .NET 2.0?

$
0
0
Hi,

I'm working to "convert" a substantial body of native C++ code (DLL) to a C++/CLI assembly.  I'm using VS 2015 tools, and I need to target .NET 2.0.50727.  My company uses custom build scripts -- not a VS project, not MSBuild -- so I need to understand how to do with using command-line args to cl, link, etc.

To get started, I kept all of the existing native code as-is, building to .lib files.  I've introduced a simple C++/CLI file with one ref class, just to see if I can produce a working build.  All of them get linked together into a DLL.

I'm compiling the C++/CLI file with /clr /clr:nostdlib /d1clr:nomscorlib and some /FU references to the v2.0.50727 versions of mscorlib.dll.

What I end up with is a managed assembly which includes .NET 2.0 references (which I added via /FU), as well as references to .NET 4.0's mscorlib and System.

How do I build this so that the assembly only relies on .NET 2.0?

Thanks for your help.

ISSUES debugging a C++ program Using Codejock SkinFramework Pro for a big MFC Application. and general C++ questions using MFC with static libraries

$
0
0

Hello, I'm asking people who know Codejock SkinFramework or Toolkit

I bought the pro Version of SkinFramework from Codejock to apply some skins for my MFC application.

Last week I downloaded the toolkit pro Evaluation version, I tried to add skins and everything was alright.



I added only this to my code:

//So to add a Skin I used this in the stdafx.h :
#include <XTPToolkitPro.h>


//And in my dialog constructor :
XTPSkinManager()->LoadSkin(_T("C:\\Windows8.cjstyles"));

And my app was skinned with any cjstyles or msstyles. (in debug mode only because the only options available in an Evaluation version of the toolkit is "Using MFC in a shared DLL")



This time I'm doing the exact same thing, but with SkinFramework Pro, but it's not working. The code is generating well, but when I Debug my solution. The app is cashing directly. the change is here is that i want to use "using MFC in a static library" and in Multi thread so in both release and Debug Mode. (you can find down my command lines for this project)

So what I added to my code with The pro Version of SkinFramework (v17) is this :

//So to add a Skin I used this in the stdafx.h :
#include <XTSkinFrameworkPro.h>


//And in my dialog constructor :
XTPSkinManager()->LoadSkin(_T("C:\\Windows8.cjstyles")); 

And this is generating but The application is not executing anymore with this window appearing:

I remember I've got problems with Paths before and I had the same issues so I put the cjstyle directly in the C disk root.

___________________________________

1st question is : 

what is the right way to write this line :

XTPSkinManager()->LoadSkin(_T("C:\\Windows8.cjstyles")); 

but using this path "C:\Program Files (x86)\Codejock Software\MFC\Xtreme Skin Framework v17.1.0\Source\SkinFramework\Styles\Windows8.cjstyles" instead of "C:\\Windows8.cjstyles".


___________________________________

2nd Question :

If I want to compile it with "using MFC with static library" and "MT" (Multi Thread) and Static Debug, or static Release, do I have to add the DLLs or .Lib(s) to my folder? Do you know a link [or in a beautifull reply (^^)]  that can quickly help me to understand.

because I have a lot of Libs and Dlls of codejock that i recieved with it. So I don't know which one i include in the properties, or copy in my folder (I'm quiet lost in this part)

___________________________________


my command lines in Release mode :

For C/C++ options :

/GS /analyze- /W1 /Gy /Zc:wchar_t /I"C:\Program Files (x86)\Codejock Software\MFC\Xtreme Skin Framework v17.1.0\Source" /I"c:\Program Files\Microsoft SDKs\Windows\v7.1\Include" /I"jsoncpp" /I"..\pjlib\include" /I"..\pjsip\include" /I"..\pjmedia\include" /I"..\pjnath\include" /I"..\pjlib-util\include" /Zi /Gm- /O2 /Fd"Release\vc110.pdb" /fp:precise /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /Gd /Oy- /MT /Fa"Release\" /EHsc /nologo /Fo"Release\" /Fp"Release\microsip.pch" 

For link editor :

/OUT:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Release\microsip.exe" /MANIFEST /NXCOMPAT /PDB:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Release\microsip.pdb" /DYNAMICBASE "imm32.lib" "version.lib" "winmm.lib""strmbase.lib" "mapi32.lib" "JabraNativeHid.lib" "Spokes.lib" /MACHINE:X86 /NODEFAULTLIB:"libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib" /OPT:REF /SAFESEH:NO /INCREMENTAL /PGD:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Release\microsip.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Release\microsip.exe.intermediate.manifest" /OPT:NOICF /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"C:\Program Files (x86)\Codejock Software\MFC\Xtreme Skin Framework v17.1.0\Lib\vc110" /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib" /LIBPATH:"c:\OpenSSL\lib\VC\static" /LIBPATH:"../third_party/opencore-amrnb" /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\BaseClasses\Release" /LIBPATH:"../lib" /LIBPATH:"../ffmpeg/lib" /TLBID:1 

My command Lines in Debug Mode :

for C/C++ options:

/GS /analyze- /W1 /Gy /Zc:wchar_t /I"C:\Program Files (x86)\Codejock Software\MFC\Xtreme Skin Framework v17.1.0\Source" /I"c:\Program Files\Microsoft SDKs\Windows\v7.1\Include" /I"jsoncpp" /I"..\pjlib\include" /I"..\pjsip\include" /I"..\pjmedia\include" /I"..\pjnath\include" /I"..\pjlib-util\include" /ZI /Gm- /Od /Fd"Debug\vc110.pdb" /fp:precise /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /Oy- /MTd /Fa"Debug\" /EHsc /nologo /Fo"Debug\" /Fp"Debug\microsip.pch" 

For link editor :

/OUT:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Debug\microsip.exe" /MANIFEST /NXCOMPAT /PDB:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Debug\microsip.pdb" /DYNAMICBASE "imm32.lib" "version.lib" "winmm.lib""strmbasd.lib" "mapi32.lib" "Spokes.lib" "JabraNativeHid.lib" /DEBUG /MACHINE:X86 /NODEFAULTLIB:"libcmt.lib" /SAFESEH:NO /INCREMENTAL /PGD:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Debug\microsip.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Debug\microsip.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib" /LIBPATH:"c:\OpenSSL\lib\VC\static" /LIBPATH:"../third_party/opencore-amrnb" /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\BaseClasses\Release" /LIBPATH:"../lib" /LIBPATH:"../ffmpeg/lib" /LIBPATH:"C:\Program Files (x86)\Codejock Software\MFC\Xtreme Skin Framework v17.1.0\Lib\vc110" /TLBID:1 


Thank you all for you help and sorry for my english level!

Sincerely, Ahmed.

QueryFullProcessImageName gives wrong path for renamed directory

$
0
0

Hello,

I've seen an interesting problem. In my process I get process name for another module incorrect after second launch. I used function
QueryFullProcessImageName  Which is working fine for first launch,but when I rename the directory where exe resides it gives older path as exe path.
For example, if I run an executable "C:\DIR1\proc.exe" I got the correct path
If I close proc.exe and rename the folder DIR1 into DIR2 and run the application, I get same path ran prevoiously C:\DIR1\proc.exe expected C:\DIR2\proc.exe ,

any help will really appriciated.

~Thanks

Sachin


C++ VS15 Clang, CMake, build error

$
0
0


Hi, I try to build 'hello world' with simple cmake:

add_executable(Hello
    Hello.cpp
)

Platform toolset Clang 3.7

and got error:

V140\Microsoft.Cpp.Clang.targets(206,5): error : Element <DebugInformationFormat> has an invalid value of "ProgramDatabase"
V140\Microsoft.Cpp.Clang.targets(206,5): error : Element <ExceptionHandling> has an invalid value of "Sync"


Upgrading to VS 2015 Pro MSDN.

$
0
0
Can someone tell me what tools and OSes are included with VS 2015/PRO with MSDN subscription?  What OSes are included in the package?   I can't find a MS page with the specific details of what products are included.

Hector Santos, CTO Santronics Software, Inc. http://www.santronics.com


Compilation errors in xlocale using VC++2012

$
0
0

I built my application which I migrated from Tornado/VxWorks to VC++/Windows and I got the following errors:

........

1>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xlocale(2395): warning C4002: too many actual parameters for macro 'toupper'
1>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xlocale(2387): error C2065: '_Last' : undeclared identifier
.........

My questions are:

1. I didn't update my codes to include locale/xlocale into my programs although I built it using VC++2012, how come it came to my program?

2. How come are there such errors in compilation?

3. How can I conquer it?

Command more.com can't redirect the context which over 65534 lines?

$
0
0

When I run command more.com to display a large file(over 65535 lines) in the command prompt, it display all the lines correctly.

When I run the same command and want to redirect the result to another file, it is stoped in the command prompt.

I opened the redirected file, and find the message which is only 65534 lines and a line of more's message.

I used Windbg to attach the process of more.com, get the stack of more.com. I found that more is waitting for input.

How can I redirect all the context in the more.com for large file?

  

   Command : more c:\WriteBigFile.txt > c:\redirect.txt

   Context of redirect.txt:  

       ......      

       65531
       65532
       65533
       65534
       -- More (99%) --

       *****file end

    Debug message:

      001bf290 77c96488 779e4d26 00000010 001bf2f4 ntdll!KiFastSystemCallRet (FPO: [0,0,0])
      001bf294 779e4d26 00000010 001bf2f4 001bf2f4 ntdll!NtRequestWaitReplyPort+0xc (FPO: [3,0,0])
      001bf2b4 779f2a0b 001bf2f4 00020590 0000001d kernel32!ConsoleClientCallServer+0x88 (FPO: [Non-Fpo])
      001bf3b0 77a3cff8 00000013 001fb9f8 00000100 kernel32!ReadConsoleInternal+0x1ac (FPO: [Non-Fpo])
      001bf438 779fbb64 00000013 001fb9f8 00000100 kernel32!ReadConsoleA+0x40 (FPO: [Non-Fpo])

                                                                                        ****************************Read key from console?

      001bf480 6d081c4e 00000013 001fb9f8 00000100 kernel32!ReadFileImplementation+0x75 (FPO: [Non-Fpo])
      001bf4a8 6d07f875 001fb9f8 00000100 001fb6e0 ulib!KEYBOARD::FillBuffer+0x20 (FPO: [Non-Fpo])
      001bf4f0 6d07f9af 001bf530 b0111b3f 0000fffe ulib!BUFFER_STREAM::GetBuffer+0x30 (FPO: [Non-Fpo])
      001bf528 000f2d45 001bf564 00000000 0000fffe ulib!BUFFER_STREAM::ReadChar+0x26 (FPO: [Non-Fpo])
      001bf568 000f309a 001fcf70 001bf58c 001bf5d0 more!MORE::DoOption+0x5a (FPO: [Non-Fpo])
      001bf5c0 000f3171 001fbb00 001fcf70 0000fffe more!MORE::PageStream+0xc5 (FPO: [Non-Fpo])
      001bf5f4 000f3237 000f1334 001f8f88 6d078b20 more!MORE::DoPaging+0xba (FPO: [Non-Fpo])
      001bf8d8 000f33c7 00000002 00482760 00481ad0 more!main+0x63 (FPO: [Non-Fpo])
      001bf91c 779def1c 7ffdf000 001bf968 77cb3b53 more!_initterm_e+0x163 (FPO: [Non-Fpo])
      001bf928 77cb3b53 7ffdf000 7641cdfa 00000000 kernel32!BaseThreadInitThunk+0xe (FPO: [Non-Fpo])
      001bf968 77cb3b26 000f34f8 7ffdf000 00000000 ntdll!__RtlUserThreadStart+0x70 (FPO: [Non-Fpo])
      001bf980 00000000 000f34f8 7ffdf000 00000000 ntdll!_RtlUserThreadStart+0x1b (FPO: [Non-Fpo])

Thank you a lot.

HowTo: Multiple Views inside a single MDI child window

$
0
0

Hello everybody,

I have a CMDIChildWndEx containing a CHTMLView (all created by the app wizard) and until now everything works fine. However I needed to add a CTreeView to the same MDI child window, docked to the left, next to the HTML view (not to the main frame, as generated by the wizard).

The HTML view and the tree view must share the same CDocument instance.

I tried to create the view manually but I failed to succeed.

Any help please?

Thanks in advance.

Any alternative locations for MSVCR110.dll ??

$
0
0

I cannot get the link at  https://www.microsoft.com/en-us/download/details.aspx?id=30679 to let me actually download the files I choose after the Download control is clicked. I can click check boxes selecting the 3 files, but clicking Next just either causes server error 500 in IE ,and Chrome times out.

Is there any where else I can get these files ?

 

trying to register Visual studio express 2005 C++

$
0
0

Is it still possible to register visual studio 2005 or 2003?

I need the older version to build a old program and hopefuly update it

Access .NET 4.5 DLL from 2.0 Application

$
0
0

We have upgraded one application to .NET 4.5.2 Framework, and also we have some older application built in .NET 2.0.

The issue here is, the 2.0 Application cannot find the 4.5 dlls which is under the new GAC (%windir%\Microsoft.NET\assembly). I think 2.0 application still looks in old GAC.

Any configuration changes will fix this issue?

Please suggest some solutions. Thanks.

How is it possible in 2016 to use MASM 8.0? (Or any ml64.exe?) There's no more Visual C++ 2005 Express.

$
0
0
I'm trying to learn assembler and I want to learn with the greatest assembler ever: MASM. But you can't install the latest MASM from MS without Visual C++ 2005 Express, which no longer seems to be available. Even clicking the link to it in the MASM 8.0 requirements takes you the page to download Visual Studio Community, aka Visual Studio 2015. What can a person do?

Programatically change the default playback device in windows system?

$
0
0
Under windows 7 or 8 is  there  any way to change window system audio playback device (i.e HDMI to Headphones).

How to change windows system timezone programmatically in c++??

$
0
0

I want to change windows system date ,time and timezone programmatically .I am able to change date and time but totally

stuck in timezone.I used msdn timezone sample " https://msdn.microsoft.com/en-us/library/windows/desktop/ms724944(v=vs.85).aspx".But it does not update timezone of system it just display current timezone of system.

How to avoid annoying warning about code page 950?

$
0
0

I built a Zinc-based program using VC++2012 and got warning:

1>c:\zinc\6.2.3\include\z_app.hpp : warning C4819: The file contains a character that cannot be represented in the current code page (950). Save the file in Unicode format to prevent data loss

Zinc is PSA product, seems impossible to contain character of Code Page 950. How can I avoid such warning?


regsvr32.exe fails for some Windows 10 systems

$
0
0
Have ActiveX module, compiled with VS2008. Using /CLR so must also use /MD [cannot static link]. Can successfully register OCX on all systems earlier than Windows 10, and a Windows 10 upgrade-and-retain-files system but fail on a Windows 10 upgrade-and-wipe-files system. DEPENDS.EXE indicated MSVCR90.DLL was missing, though it was present in many locations on problem system. Put MSVCR90.DLL in application home folder, put application home folder in PATH, no more complaints for MSVCR90.DLL. But complaints remain for SHCORE.DLL, SHLWAPI.DLL and IEFRAME.DLL. Windows 10 system that successfully registers OCX has file sizes of 726,288 and 332,104 and 13,382,656 respectively. Windows 10 system that fails to register OCX has file sizes of 724,168 and 328,488 and 12,504,576 respectively. Obviously, these are very different files, despite both systems being honest Microsoft Windows 10 installations. I am afraid to supersede only the problem files on the problem system because I might then break other DLLs that are dependent on the "wrong" versions. How to synchronize the Windows 10 systems? Note, all systems have been run through Windows Update.

Learning how to use Visual Studio with C++.

$
0
0

Hello!

I have some experience programming C++ using notepad++ and compiling with cygwin, but am trying to learn to use Visual Studio as my IDE. I have tried to find tutorials on the internet but they only seem to provide information on how to program in C++ (which I can already do) but nothing on how to exploit the features of VS itself, which are completely foreign. Similarly, there are other tutorials the describe how to use VS, but are in other languages that I am not familiar with. Can anyone recommend some resources on how to get to grips with VS in C++??

For reference, I use C++ to run simulations as a mechanical engineer, so am not looking to learn how to build applications, but need an IDE to make the debugging process easier.

Thanks in advance for any responses!

Viewing all 15302 articles
Browse latest View live


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