teechart 4 ocx doesn't run on win7 - mfc

We have a problem with an old application which use teechart.ocx version 4.02 OCX release 4.0.0.7.
On my Win7 (64 bits) everything run without problem. But on the Win7 of my colleague (also 64 bits), the control does'nt appears.
Of course we have registred the ocx (within admin cmd shell).
To be sure that the problem does'nt come from our (old) application, we perform a test on both machine with the demo example which comes with Teechart.ocx (TeechartPro/Examples/VisualC++/Version6/TeeFiles).
On my PC everything runs well.... but on the other one, same problem : we get the application without the TChart control.
And when we click the 'about' button, we get an error : debug assertion failed / winocc.cpp / line 345...
Is there anybody who can help ??????
Thank you
Greg

I found the reason... it should be the MFC dlls and libs which are not exactly the same on each PC. They have the same name, but with different size & dates.
Just recompile on the most recent environnment clears the problem
Hope it can help

Related

Exe is running fine when run with VisualStudio2008 (Release Build) but if I run from Folder directly It crash at only one button

I am using QT,ITK,VTK and build theses libraries in X64.
I am developing an application in X64 using VisualStudio2008 .
This application loading the Image data and also provide around 10 buttons for different functionality when I am running it into debug/Release mode from Visual Studio it works fine, But If I run it from Folder or after making setup by clicking on exe it run fine with all the the features except one that is crashing in mid of the process and it is very random crash .
sometime it crash, sometimes not with the same data and if crash then also not in specific location sometime at
VTKImageData->DeepCopy(data),
ITKConnectorType::Pointer ItkConnector= ITKConnectorType::New();
after displaying QT widget on mainwindow.
But all the other widget functionality are working fine.
Please Help me. Thanks in advance.

MFC Ribbon app not displaying ribbon - when .exe is copy pasted to a different machine

Well, I am facing a strange problem. I have developed a sample MFC ribbon application on my machine - Windows 7 , with Visual Studio 2008. When I copy paste the .exe onto my laptop and run the app , I don't see the ribbon menu (in fact the app has not menu now) .
I have tried looking up the .dll that load in each case(on my work machine and laptop) using process monitor but I am unable to locate what I might be missing. Any help will be greatly appreciated.
Edit 1 -
Ok, So thanks for your responses. Some progress has been made with this issue
I changed my IDE to VS 2010. The ribbon was coded manually and I figured out if I could add it as a resource maybe the problem would be solved. VS 2008 did not have the option of adding a ribbon as a resource.
I installed the VS 2010 Service Pack Redistributable X86/X64 depending on whether the machine is 32 or 64 bit.
I built a new "ribbontest.exe" app from VS 2010 and deployed it on other machines on which I would test my actual app. The ribbon for "ribbontest.exe" loads without any problems.
When I deploy my app and run it, first the old menubar loads for a sec or two, then the ribbon flashes and disappears.
A little history of the app I am referring to -
Initially my application had the menubar view. I followed this article http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c14929/MFC-Feature-Pack-An-Introduction.htm to accommodate a ribbon.
Any suggestions?
Most likely there's a conflict in the settings 'paths'. In your InitInstance() handler, you've got a statement like this:
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need
// Change the registry key under which our settings are stored
SetRegistryKey(_T("yourappname"));
If you haven't changed that name yet, do it. If you did, open regedit.exe on your target machine and remove the whole key under HKCU\Software\yourappname and then try again.
MFC stores user customizations of Ribbons/Menus/... under that key. But if you changed your app those settings don't necessarily match anymore and you can end up with stuff not showing correctly or not at all.
Make sure you download and install the Visual C++ Redistributable Runtime on your destination machine: http://www.microsoft.com/en-us/download/details.aspx?id=29
Or, something like it. Make sure you have architecture (x86/x64) correct and make sure it matches with the service pack version you compile with.
Joe is right: you need redistributable.
Joe is right: you cannot run 64-bit program on 32-bit machine.
All of the above would be indicated by the system (missing DLL, configuration incorrect, or 64/32 bit discrepancy)
Joe is right: your application must be built for specific set of minimum Windows version and service pack.
In addition to Joe’s post you must run release build not debug build.
If all of those requirements are met and you still have this problem, try linking MFC statically and see if problem persists.

Crash on Windows 7 but running on XP

i've written a small application using c++, Qt and Visual Studio 2010. It's working on Windows XP (32bit) but it crashes on Windows 7 (64 bit) right after start-up. I see a "The program has stopped working..." error. Do I have to recompile the application for Windows 7? And is it possible to get more information why it crashes?
Thanks
In general you wouldn't have to recompile for windows 7, but it depends on your application which you haven't provided details of.
The easiest way to find out is either debug it in windows 7 or put more error handling in, so that it lets you know what has gone wrong, or where it has gone wrong
I agree with what martiert said, also, if you are using some external elements, images. sound files, video files, etc ... be sure of the file location asd this was a problem for me when I was presenting my graduation project, I moved the whole solution from a directory to another and it crashed because it was reading a not found directory ... so be sure of the links of the images, videos, sounds etc ...
You might have to recompile for Windows 7/64bit. It might not even work after a recompile, since Windows 7 is not XP, and a program written for 32 bit might not work for 64. Often one don't have to recompile, but sometimes one have to, and some times a program which works on XP won't work on Windows 7.

Windows 7 and the case of the missing regtlib

I've just discovered that regtlib.exe appears to be missing from Windows 7 (and apparently from Vista as well).
I've just installed Windows 7 RC in a VM and I'm attempting to build our existing projects on the new OS. The projects are c/c++ based and I'm using visual studio 2008. In order to build these projects I need to register several tlb files that are referenced within the code base.
Has anyone also encountered this problem? And, has anyone managed to solve this?
Thanks.
Yeah regtlib was removed from vista and up. As far as I know, all it does is call LoadTypeLibEx with the REGKIND_REGISTER flag (http://msdn.microsoft.com/en-us/library/ms221249.aspx). Maybe you could write a simple replacement.
Just came across this issue (couldn't add any components to a VB6 project on Win7). This post (Error accessing the system registry in VB 6 IDE) pointed to regtlib (which is missing from Win7). I just
set the VB6 start menu icon to 'Run As Administrator' and it worked fine for adding components and should fix any problems relating to updating the registry as well.
Regards
Ian
Finally got back to trying to build our code base on windows 7. Anyway, I went back to the installer for one of the dependencies that was causing me grief. The error message from the installer wasn't to helpful but it did point to a regasm that was being run from inside the installer.
I ran the regasm command from a cmd prompt and got more information. It appears that you need administrative credentials to perform this task and our current installers don't do the privilege escalation properly.
So, long story short, I got dlls registered and the build appears to be working.

Cannot load symbols in GlowCode x64

This question might be too application specific to be out here on SO, but here goes.
I am trying to profile a simple native c++ application using GlowCode-x64 6.2 .
The problem is that no matter which settings I set in the "Options->Symbol server and search path" the symbols are never loaded. My .pdb files are all in the same folder as the .exe file too.
When entering the "Running->Hooks" menu and adding modules I always get "Not loaded" in the "Address" column.
I have read the startup tutorial several times and followed it every step of the way.
I have even tried profiling the same program using AQTime6, which worked perfectly. So I know that the debug information is there.
I also recall using GlowCode 2 years ago on my 32bit laptop, and got it working at once.
Any help beyond "read the manual again" is greatly appreciated.
Edit:
Just wanted to point out that my application is built with the VS2005 SP1 compiler.
Edit2:
Just got home from work and tried GlowCode at home on Win32. Worked like a charm.
I visited the GlowCode site and found that version 6.2 is only 32 bit build and not 64. GlowCode 7.0 has both the installers, 32 bit and 64 bit. This might be your problem.