16 bit and 32 bit api calls from PB app.

Hi,
i have an application that i want to run on both windows 3.1 and windows 95
pc's. however, i am making some api calls in this application. i would like
to make 16 bit api calls if the pc is running 3.1 and 32 bit calls if it is
95. is there any way i can find out what operating system the pc has, as
soon as my app is started up?
any help will be greatly appreciated.
thanks,

Rohit


0
Rohit
1/20/1999 3:08:00 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

5 Replies
649 Views

Similar Articles

[PageSpeed] 44

Look at the environment object.  This is what you need.

Regards,

Costas Tsaklas[TeamPS]
Elevated Technologies, Inc. - New York
www.elevatedtech.com

Rohit Sankholkar wrote in message ...
>Hi,
>i have an application that i want to run on both windows 3.1 and windows 95
>pc's. however, i am making some api calls in this application. i would like
>to make 16 bit api calls if the pc is running 3.1 and 32 bit calls if it is
>95. is there any way i can find out what operating system the pc has, as
>soon as my app is started up?
>any help will be greatly appreciated.
>thanks,
>
>Rohit
>
>


0
Costas
1/20/1999 3:12:44 PM
Rohit,

Look at the online help for the GetEnvironment PowerScript function -- it
has some sample code.

pbm_hopethishelps,
Roy

Rohit Sankholkar wrote in message <4Efo0iIR#GA.50@forums.powersoft.com>...
>Costas,
>Thanks for the prompt reply. Where can i find the environment object and
how
>do i use it?
>Thanks,
>Rohit
>
>
>Costas Tsaklas[TeamPS] wrote in message ...
>>Look at the environment object.  This is what you need.
>>
>>Regards,
>>
>>Costas Tsaklas[TeamPS]
>>Elevated Technologies, Inc. - New York
>>www.elevatedtech.com
>>
>>Rohit Sankholkar wrote in message ...
>>>Hi,
>>>i have an application that i want to run on both windows 3.1 and windows
>95
>>>pc's. however, i am making some api calls in this application. i would
>like
>>>to make 16 bit api calls if the pc is running 3.1 and 32 bit calls if it
>is
>>>95. is there any way i can find out what operating system the pc has, as
>>>soon as my app is started up?
>>>any help will be greatly appreciated.
>>>thanks,
>>>
>>>Rohit
>>>
>>>
>>
>>
>
>


0
Roy
1/20/1999 3:24:02 PM
Costas,
Thanks for the prompt reply. Where can i find the environment object and how
do i use it?
Thanks,
Rohit


Costas Tsaklas[TeamPS] wrote in message ...
>Look at the environment object.  This is what you need.
>
>Regards,
>
>Costas Tsaklas[TeamPS]
>Elevated Technologies, Inc. - New York
>www.elevatedtech.com
>
>Rohit Sankholkar wrote in message ...
>>Hi,
>>i have an application that i want to run on both windows 3.1 and windows
95
>>pc's. however, i am making some api calls in this application. i would
like
>>to make 16 bit api calls if the pc is running 3.1 and 32 bit calls if it
is
>>95. is there any way i can find out what operating system the pc has, as
>>soon as my app is started up?
>>any help will be greatly appreciated.
>>thanks,
>>
>>Rohit
>>
>>
>
>


0
Rohit
1/20/1999 3:25:36 PM
As Roy mentioned take a look at the online help and if you have any
questions let me know.

Regards,

Costas Tsaklas[TeamPS]
Elevated Technologies, Inc. - New York
www.elevatedtech.com

Rohit Sankholkar wrote in message <4Efo0iIR#GA.50@forums.powersoft.com>...
>Costas,
>Thanks for the prompt reply. Where can i find the environment object and
how
>do i use it?
>Thanks,
>Rohit
>
>
>Costas Tsaklas[TeamPS] wrote in message ...
>>Look at the environment object.  This is what you need.
>>
>>Regards,
>>
>>Costas Tsaklas[TeamPS]
>>Elevated Technologies, Inc. - New York
>>www.elevatedtech.com
>>
>>Rohit Sankholkar wrote in message ...
>>>Hi,
>>>i have an application that i want to run on both windows 3.1 and windows
>95
>>>pc's. however, i am making some api calls in this application. i would
>like
>>>to make 16 bit api calls if the pc is running 3.1 and 32 bit calls if it
>is
>>>95. is there any way i can find out what operating system the pc has, as
>>>soon as my app is started up?
>>>any help will be greatly appreciated.
>>>thanks,
>>>
>>>Rohit
>>>
>>>
>>
>>
>
>


0
Costas
1/20/1999 5:56:43 PM
Rohit :
Look under the getEnvironment function and also 
the proerties of environment object, in the online help

HTH


On Wed, 20 Jan 1999 10:25:36 -0500,
 in powersoft.public.powerbuilder.general
Rohit Sankholkar <rohit_sankholkar@csi.com> wrote: 
>Costas,
>Thanks for the prompt reply. Where can i find the environment object and how
>do i use it?
>Thanks,
>Rohit
>
>
>Costas Tsaklas[TeamPS] wrote in message ...
>>Look at the environment object.  This is what you need.
>>
>>Regards,
>>
>>Costas Tsaklas[TeamPS]
>>Elevated Technologies, Inc. - New York
>>www.elevatedtech.com
>>
>>Rohit Sankholkar wrote in message ...
>>>Hi,
>>>i have an application that i want to run on both windows 3.1 and windows
>95
>>>pc's. however, i am making some api calls in this application. i would
>like
>>>to make 16 bit api calls if the pc is running 3.1 and 32 bit calls if it
>is
>>>95. is there any way i can find out what operating system the pc has, as
>>>soon as my app is started up?
>>>any help will be greatly appreciated.
>>>thanks,
>>>
>>>Rohit
>>>
>>>
>>
>>
>
>
0
Medha
1/20/1999 8:52:31 PM
Reply:

Similar Artilces:

PB 16 bit and PB 32 bit and API calls
Hello, I am trying to do a API call for a fingerprint reader. I have done all of the global declarations and I am sure all variables are mapped correctly. I don't get any errors from the function I am calling into, however I do get a PB error on the Global function I declared. The error is telling me that there is an invalid stack pointer. This function returns the number of the device which was created which is essentially a pointer. My question is this. Since I am running PB 7 which is 32 bit is it possible that if these ..DLL's I am calling into is 16 bit will I get ...

Changing 16 bit API calls to 32 bit API calls.
Hi. I have an application which i am migrating from 16 Bit PB4 to 32 bit PB5. I have the following 16 bit API calls in the application. Can someone please let me what the corresponding 32 bit API calls would be and what libraries i can find them in? Also, where can i find information on API calls? function int FindWindow(string lpClassName, string lpWindowName)LIBRARY "user.exe" function int Winhelp(int iWindowHandle, string lpszhelpfile, uint fuCommand, long dwData) Library "user.exe" function ULONG MAPISendDocuments(uLong ulUIParm, string lpszDelimChar, string ...

Calling 16 bit DLL from 32 bit PB app
Is it possible to call a 16 bit C DLL from a 32 bit PB application? If so, what is the correct calling convention in C. I am using PB 6.5.1 Thanks, Brian Wetzel wetzelb@mindless.com On Tue, 18 Apr 2000 17:24:23 -0500, "Brian Wetzel" <wetzelb@mindless.com> wrote: I seem to recall there used to be a white paper on the Sybase Web site describing how to access 16 bit ODBC from 32 bit PB. That makes me thing that it is possible, but I don't remember the specifics. You might want to check out the Sybase site and see if you can find anything. I'll check...

How to call a 16-bit app from a 32-bit powerb app? (WinNT,Win2k,WinXP)
Hi, In our powerbuilderapplication we call a little third-party16-bit dos application. The strange thing is that the third-party application runs if we start it manually, but it won't run if we start it from our pbapp!! Then we get the following fault... ntvdm-288 ..... 16-bits ms_dos subsystem ntvdm-288.248.2f0001 %systemroot%\system32\config.nt. The systemfile is not suited for ms-dos or ms-windows applications. Choose close or ..... The file is called from our powerbuilderapp with createprocess(.........) Thanks, ICE Try RUN( ) instead. /ck "ICE"...

32-bit & 16-bit PB apps
Is anyone successfully running a PB 5.0.0x 32-bit PB app and a 16-bit PB app simultaneously on the same machine? Note: There were fixes in 5.0.03 (changes in internal class names) that allowed this to happen. After this change, the class names between 16 and 32-bit were different, so could be loaded at the same time. Anything previous to 5.0.03, this is a known shortfall. However, be aware that the change in class names may break some testing tools' scripts built in previous versions (not the good testing tools, but some... ). The good testing tools know how to adjust for PB c...

Calling 16 bit dll from 32 bit Powerbuilder
I want to know if it is possible to call a function out of a 16 bit dll from within a Power Builder App that was compiled in 32 bit. If so, How ? Hi, No. This is not possible direclty. The most simple way is to get a 32bit version of that DLL, but you probably don't have that right? So, your in deep shit. You could create a thunking layer, which is a 32bit layer, converting 32bit calls to 16bit but this is not an easy task to do. Other option is creating a 16bit VB oleserver which calls your DLL. This ole server can be used within your 32bit PB environment. But first, try to g...

Creating 16-bit apps in 32-bit PB
Can ANYONE create a 16-bit app in 32-bit PB? Sure. 16 bit machine code EXE/DLLs are created using the 32 bit version of PB 5.0. 16 bit p-code EXE/PBDs however, must be created using the 16 bit version of PowerBuilder. HTH, Don Roof [TeamPS] Kevin Gregg <kgregg@solaris1.mysolution.com> wrote in article <01bcc53b$40fa0240$0f02000a@klgregg>... > Can ANYONE create a 16-bit app in 32-bit PB? > ...

16 bits CCmail and 32 bits Powerbuilder app
Does any one know how to create and send email to 16bits ccmail 2.2 from 32 bits powerbuilder application ? Thanks in advance Check out my site : http://members.xoom.com/sanskrut It may help you!! All the best in advance!! Nirav. Zakia Pirzada wrote: > Does any one know how to create and send email to 16bits ccmail 2.2 from > 32 bits powerbuilder application ? > > Thanks in advance ...

Calling 16-bit functions (DLL) from 32-bit App?
I've migrated a 16-bit app to a 32-bit app recently. The one problem is that we purchased a communications DLL from a third party who has since gone out of business, so there's no chance at getting a 32-bit version. The DLL is 16-bit, and PowerBuilder (32-bit) has a problem opening the library. Is there anyway to call functions in a 16-bit DLL from a 32-bit application? Chris, Unfortunately not. Unless the DLL is 'thunkable', then it can't be accessed from PB. Who is/was the 3rd party vendor? hth, -- Anthony M. Perugini Principal Consultant CPDP,...

Running Concurrent 32-bit and 16-bit PB apps
We developed an exe application in PB5 32-bit. Since we needed to use third-party 16-bit dlls for one module, we developed a stand-alone 16-bit exe that is run by the 32-bit and use DDE to communicate between the two. In addition, we want to terminate the 16-bit exe when the 32-bit exe is closed. Although the relationship between the 16-bit and 32-bit has always been touchy, we have been able to run them concurrently. Unfortunately, we have been unable to bring both applications down gracefully. Usually we get a WIN95 version of the GPF ("This application will be closed&...

Converting 16-bit API calls to 32-bit using pbm_commnotify
I'm converting an old PB5.0 app to PB6.5 and having problems with API calls to do a credit card validation via modem. The original code appears to have been copy/pasted with only minor modifications from Sept/1995 PowerBuilder Developer's Journal ("Serial Communications Manager" http://www.sys-con.com/pbdj/source/995/robinson.htm). Now I need to make it work with 32-bit APIs. I've never worked with serial communication before, so I feel a bit like a fish out of water here. Any help would be greatly appreciated. The main problem I'm experiencing is with the p...

Run 32-bit app from 16-bit app
We want to run Excel 97 (32-bit) from a PB app (16-bit PB5.0.2). We cannot get Excel 97 to run from a 16-bit PB app with the "Run(Excel.exe)" function. How can we get it to work? Is it any work-around, outside software or middle ware to enable us to do this? TIA, Soo ...

Run 32 bit app from 16 bit app
We want to run Excel 97 (32-bit) from a PB app (16-bit PB5.0.2). We cannot get Excel 97 to run from a 16-bit PB app with the "Run(Excel.exe)" function. How can we get it to work? Is it any work-around, outside software or middle ware to enable us to do this? TIA, Soo You can try using an excel OLE control and calling the ole_control.Activate(OFFSITE!) command to activate excel. Be careful though I have had difficulty using a 16-bit pb app making ole calls on a 23-bit OS like Win95 - it seems to cause big gpf's. Soo Lam wrote: > We want to run Excel 97 (...

16-bit PB calling a 16-bit DLL?
I am trying to build a "bridge" between a PB program (originally a 32-bit .exe) and a 32-bit DLL (I can't change this to 16-bit); both work flawlessly when run as 32-bit under Windows 95. Now... when I try to convert the PB app to 16-bit, and call my bridge pgm (a 16-bit .dll compiled with the Watcom C/C++ compiler v 10.?), I get a message "error calling external function..." when I try to access the function (the .dll loads fine). I have checked the spelling; I think the prototypes are correct, I have looked for samples (to no avail), etc. Does anyone kno...