Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 10 FEB 2004 12:47:02PM Jim Vaughan wrote:

I am call a function in a DLL like this:

ERROR_TEXT=EXPLAIN_ERR(2,ERR)

Defined like this:

LPCHAR PASCAL explain_err(INT,INT)

It worked OK under 4, but under 7 the text value retuned is a single char instead of the full text string.

I am doing something wrong or have I hit a bug.

I tried re-running declare_fcns.


At 10 FEB 2004 01:13PM Pat McNerthney wrote:

Try:

LPSTR PASCAL explain_err(INT,INT)

Pat


At 10 FEB 2004 01:17PM Jim Vaughan wrote:

This has the same problem:

ERR= 2

ERROR_TEXT=":CHAR(0)

CALL EXPLAIN_ERR2(2,ERR, ERROR_TEXT)

Defined like this:

VOID PASCAL explain_err2(INT,INT,LPCHAR)


At 10 FEB 2004 01:25PM Jim Vaughan wrote:

That works.

Do I need to change all LPCHAR PASCAL to LPSTR PASCAL

and all

LPCHAR to LPSTR

?


At 10 FEB 2004 05:28PM Pat McNerthney wrote:

Only the return value of LPCHAR has to change if it really is a null-terminated string you want returned. The LPCHAR parameter works pretty much like it always has, although if you want the engine to automatically null-terminate the string for you, then you might want to use LPSTR.

Pat


At 10 FEB 2004 05:33PM Jim Vaughan wrote:

OK, gotcha.

I'll leave everything as is. If something needs a null terminated string I make the change.

Thanks Pat.


At 10 FEB 2004 07:34PM Donald Bakke wrote:

Jim,

FYI, we will cover the changes made in 7.0 data types at the SoCalRUG meeting tomorrow. We'll have a handout on this.

[email protected]

SRP Computer Solutions, Inc.


At 10 FEB 2004 09:26PM Jim Vaughan wrote:

Cool, see you tomorrow.


At 11 FEB 2004 04:53PM Chris Callaghan wrote:

Hi Don

Any chance of posting those changes for those of us in a different part of the world?


At 11 FEB 2004 07:06PM Donald Bakke wrote:

Chris,

We'll make it a download on the KnowledgeBase section of our website unless Rev says they want to do it.

[email protected]

SRP Computer Solutions, Inc.


At 11 FEB 2004 09:49PM Jim Vaughan wrote:

I enjoyed the meeting today, very informative.

When is the next one?

BTW the problem I have with reporter is a message "Could not connect to OI" when launching reporter.exe a second time. It doesn't happen on all machines all the time, but I have written a script in the batch language we distribute with our product which reproduces it every time on my machine. My next step is to see if I can isolate the exact cause. Once I have more details I will post them here on the forum.


At 12 FEB 2004 12:31AM Donald Bakke wrote:

Jim,

It was a good meeting. I was encouraged to have the participation we had. Our next meeting is unscheduled right now but we try to have them every three months. When we relocate and have our conference room inside our office we might try to schedule them more often. Of course, preparing for them can be a lot of work as well so that also limits how often we can put them on unless someone else wants to jump in and do their own demo and/or "how to" workshop.

Interested in showing us the wonders of Reporter?

[email protected]

SRP Computer Solutions, Inc.


At 12 FEB 2004 08:42PM Jim Vaughan wrote:

If any of the guys that I work with read that they will laugh. I know next to nothing about reporter.

The main reason we use reporter is I can have one of our technical but non-programmers create reports for customers; freeing me up to do more important coding.

I'd be happy to show Tactic at the next meeting if you would like.


At 13 FEB 2004 03:13PM Donald Bakke wrote:

To all who are interested:

We have added a short white paper detailing all the DLL parameter data types that are available in OpenInsight 7.0. Please go to www.srpcs.com, Developer's Resources, and then Knowledgebase. Or, you might be able to download directly from this link.

[email protected]

SRP Computer Solutions, Inc.


At 13 FEB 2004 03:42PM Pat McNerthney wrote:

Don,

Some minor corrections to your white paper:

3. LPCHAR used to be the type for specifying strings. Now, however, LPCHAR, LPACHAR, LPUCHAR, and LPWCHAR should only be used when passing a single character.

Actually, all of these can be used to pass an array of characters, not just one. However, the engine will not automatically ensure these types are null terminated.

4. LPSTR, LPASTR, LPUSTR, and LPWSTR should now be used when passing strings.

These should be used when passing null terminated strings. The engine will ensure that the Basic+ value is terminated by a null and will truncate any returned value at a null character.

7. As before, to specify the passing of an explicit pointer, declare the parameter as INT rather than LPx. Otherwise, the LPx types will pass the pointer to the pointer.

The LPVOID type facilitates the passing of an explicit pointer.

Pat


At 13 FEB 2004 03:46PM Donald Bakke wrote:

Pat,

Thanks. I'll have Kevin upgrade the document and have it available momentarily.

[email protected]

SRP Computer Solutions, Inc.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/4935188415764ce285256e360061b0b6.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1