cancel
Showing results for 
Search instead for 
Did you mean: 

Can't use STM32CubeProgrammer API

ABeyb.1
Associate

Hi everyone,

I'm trying to develop my own console project in C++ on Visual Studio using the SMT32 API to download and verify an STM32 CPU and I need your help please.

I can build my solution with no error but I can't run it. I get : The Application was Unable to Start Correctly (0xc000007b). Same thing happens when I try to run the project STM32CubePrgAP.sln provided by STM as an example on how to use their API (available on the install path of STM32CubeProgrammer)

I’m not an expert but I already used DLL on my projects with no problem.

I made sure to use a compatible version (x64 or x86) of the .lib file and the project STM32CubePrgAP

Microsoft Visual C++ is already installed

I'm using Visual Studio 2019

Can you please help me ?

Thx in advance and bear with me :)

1 ACCEPTED SOLUTION

Accepted Solutions
Marcuka
Associate III

Thanks for the fast answer.

I found it. The application is 64 bit but needs the 32 bit version of these DLL files.

View solution in original post

4 REPLIES 4
Pavel A.
Evangelist III

0xc000007b is STATUS_INVALID_IMAGE_FORMAT.

"Bad Image .... either not designed to run on Windows or it contains an error."

Marcuka
Associate III

Hi,

I'm using the C++ api on 64 bit machine with success. When run the exe on another PC some DLL's are missing. It seems some of them are 32 bit. Can you please tell which version these DLL's requires - the 32 or 64 bit?

Thank in advance,

Martin0693W00000HqmfJQAR.png

Possibly need the MSVC Redistributable files from the version you used. You'll need the 32-bit ones if the app/library are 32-bit.

Use PEDUMP or other tools to check what import expectations the DLL has.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Marcuka
Associate III

Thanks for the fast answer.

I found it. The application is 64 bit but needs the 32 bit version of these DLL files.