Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

In "release build" I get "Error calling method of PBNI object" #6

Open
ChrissDeGrece opened this issue Jan 4, 2021 · 6 comments
Open

Comments

@ChrissDeGrece
Copy link

Hi,

While testing I noticed that when I run the demo using the "Debug" build , the program runs, shows the debug messageboxes and sends email fine. When using the "release build" , when it tries to run the SetCharset method , I get "Error calling method of PBNI object".

I am using VStudio 2019 to build the project.
10.0.18362.0 SDK Version

Any ideas?

Thank you

@bruce-armstrong
Copy link
Owner

I just recompiled using VS 2019 and then called it using PB 2019 R3. It worked fine for me. I'm passing "iso-3356-3" for the charset. What are you passing?

@ChrissDeGrece
Copy link
Author

Thanks for the reply and taking the time to re-test.
It doesn't seem to care what lang code I try. If it's on release VC build it always fails and the debug VC build always works with the same options.Main diff with your test could be that I am testing with PB105?

@brucearmstrong2
Copy link

I just looked and realized that I'm not currently including support for 10.5, the oldest SDK I have in the project is 12.6. In addition, I only support PowerBuilder samples for 2017 and 2019.

You took the code and added in the SDK for 10.5?

@ChrissDeGrece
Copy link
Author

Yes, exactly. I used the 10.5 PBNI SDK hoping it would work for me and it kind of did.

Unfortunately I am not so proficient in C++ and hit the wall with the release build.

@brucearmstrong2
Copy link

I wouldn't be able to figure out what is going on without looking at your code.

@ChrissDeGrece
Copy link
Author

You mean the C++ code I guess. Since it only works in debug build for me, I simply commented the #ifdef _DEBUG Messagebox functions. Didn't change anything else.

pbnismtp.cpp pastebin:
https://pastebin.com/ZEhXcBcm

My VS project
https://1drv.ms/u/s!AnB56rrSC6WfoCtX1ZZOk_UN-Nao?e=qeSeZY

In PB I use the pbnismtpdemo105 example and have imported the n_cpp_smtp pbx (debug build)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants