Skip to main content

[Migrated content. Thread originally posted on 26 January 2005]

In the past and also at this moment I'm into a lot of Windows API programming. The more I do this, the more I appreciate that 98% of application programming can be done in Acucobol.

I have used a lot of different Windows API functions from Acucobol without problems, but I can not remember that I ever succeeded in using the GetLastError successfully. It always returns a zero value. I have no idea why this is. The syntax of this function compared to all the others is so simple, one hardly can do something wrong. So I started to believe this has to do with calling this function from Acucobol. Does anyone have more information about this behaviour?

Greatly appreciated!

Ren

[Migrated content. Thread originally posted on 26 January 2005]

In the past and also at this moment I'm into a lot of Windows API programming. The more I do this, the more I appreciate that 98% of application programming can be done in Acucobol.

I have used a lot of different Windows API functions from Acucobol without problems, but I can not remember that I ever succeeded in using the GetLastError successfully. It always returns a zero value. I have no idea why this is. The syntax of this function compared to all the others is so simple, one hardly can do something wrong. So I started to believe this has to do with calling this function from Acucobol. Does anyone have more information about this behaviour?

Greatly appreciated!

Ren
Interesting, I just checked it out, and yes, it reproduces. I suggest you go to Tech support if you want to pursue this.

[Migrated content. Thread originally posted on 26 January 2005]

In the past and also at this moment I'm into a lot of Windows API programming. The more I do this, the more I appreciate that 98% of application programming can be done in Acucobol.

I have used a lot of different Windows API functions from Acucobol without problems, but I can not remember that I ever succeeded in using the GetLastError successfully. It always returns a zero value. I have no idea why this is. The syntax of this function compared to all the others is so simple, one hardly can do something wrong. So I started to believe this has to do with calling this function from Acucobol. Does anyone have more information about this behaviour?

Greatly appreciated!

Ren
Hello Gisle,

I'm amazed to find out that you did not run into this before. If functions do not work right, the Microsoft documentation advises you in many cases to call GetLastError to get more information.
The only thing I can imagine that with you the functions always work fine! :) I always have to try and try again until they work. :-(

I'll pass this remark to support as suggested, thanks!

Ren

[Migrated content. Thread originally posted on 26 January 2005]

In the past and also at this moment I'm into a lot of Windows API programming. The more I do this, the more I appreciate that 98% of application programming can be done in Acucobol.

I have used a lot of different Windows API functions from Acucobol without problems, but I can not remember that I ever succeeded in using the GetLastError successfully. It always returns a zero value. I have no idea why this is. The syntax of this function compared to all the others is so simple, one hardly can do something wrong. So I started to believe this has to do with calling this function from Acucobol. Does anyone have more information about this behaviour?

Greatly appreciated!

Ren
The only thing I can imagine that with you the functions always work fine!


:-) Thanks for the confidence. But that is not the real cause, the real cause is lazyness and the fact that I work most of these functions regularly from within the runtime and C/C , I obviously have a benefit there.
Nevertheless, fact is, when thinking about it, I have simply been too lazy to implement the GetLastError call, basically because I have realized the error independently of that and well... What should I say...

Thanks for finding this though!