Proceed to GeoCommunity Home Page


SpatialNewsGIS Data DepotGeoImaging ChannelGIS and MappingSoftwareGIS JobsGeoBids-RFPsGeoCommunity MarketplaceGIS Event Listings
HomeLoginAccountsAboutContactAdvertiseSearchFAQsForumsCartFree Newsletter

Sponsored by:


TOPICS
Today's News

Submit News

Feature Articles

Product Reviews

Education

News Affiliates

Discussions

Newsletters

Email Lists

Polls

Editor's Corner


SpatialNews Daily Newswire!
Subscribe now!

Latest Industry Headlines
Supergeo Renews Partnership Agreement with Information & Science Techno System Co. in Japan
GISCI Begins Exam Development
Esri and Institute of Fire Engineers Partner to Improve Fire Prevention Planning
Canadian Organizations Shine at the 2013 Esri International User Conference
Atlantic Secures Key Environmental Services Designation from GSA
Conference Addresses the use of Geographic Intelligence for Business and Security

Latest GeoBids-RFPs
GIS Needs Analysis-TN
GPS Equipment*Canada
Surveying Services*Canada
Hydrological Assessment*Belize
Nautical Charts*Poland

Recent Job Opportunities
Planner/GIS Specialist
Team Leader- Grape Supply Systems
Geospatial Developer

Recent Discussions
Raster images
cartographic symbology
Telephone Exchange areas in Europe
Problem showcasing Vector map on Windows CE device
Base map

GeoCommunity Mailing List
 
Mailing List Archives

Subject: Re: GISList: Arguments to DLL Call
Date:  08/30/2001 02:13:21 PM
From:  Bill Thoen



Santosh Nandi wrote:
> 1.Is there any solution where a structure needs to be passed in a DLL Call.As far as I know Avenue does not support this datatype.

When faced with DLL structures that contain data types not
supported by the calling program, you can always fake them with
data types you can support. For example, suppose you encountered
a structure like so:
...
size as BYTE
name as LPSTR
...

I don't know Avenue, but I bet you can support the LPSTR as a
plain String type. But suppose you didn't have an eight-bit byte
data type to substitute for BYTE. In that case, use a short
integer, like so (using MapBasic types):
...
size as SmallInt
name as String
...

To handle this structure, you need to know that the data that
represents the BYTE goes in the low-order half of 'size', the
first character of the string is in the high-order byte of 'size'
and the rest of the string is in 'name'. To write the value 14
into size and "Arial" into name, you use the following formula
for 'size'.
size = Asc("A") * 256 + 14
and then set name like so:
name = "rial"

Put these in your structure and as far as the DLL is concerned,
all the data elements are in the right place.

To read these values back, you can do it this way:
name = Chr$(sizeŽ) & name
size = size mod 256

Note the integer divide '' as opposed to the normal division
operator '/'. The trick is using integers to take the place of
bytes. When passed between caller and API, they're all just bits
in memory anyway: all you have to do is arrange them in the right
order.

> 2. I want to change my screen resolution through Avenue.What arguments should I pass to the DLL Call "Change Display Settings"

My guess is that you want SetGraphicsMode(). You need to get a
handle to the device context first (GetDC()), and I think you
need to also need to do something with ModifyWorldTransform().
Also don't forget to call ReleaseDC() when you're done. If you
don't have the API Bible by Dan Appleton or something comparable,
then you'll need to search places like http://www.ezvb.com/ for
the details.

--
- Bill Thoen
------------------------------------------------------------
GISnet, 1401 Walnut St., Suite C, Boulder, CO 80302
tel: 303-786-9961, fax: 303-443-4856
mailto:bthoen@gisnet.com, http://www.gisnet.com/
------------------------------------------------------------


To unsubscribe, write to gislist-unsubscribe@geocomm.com
________________________________________________________________________
Setup a GeoCommunity Account and have access to FAST DataDownloads
and Premium Career Posting at a discounted rate!
https://www.geocomm.com/cgi-bin/accounts/login

On-line Archives available at
http://spatialnews.geocomm.com/community/lists/


Sponsored by:

For information
regarding
advertising rates
Click Here!

Copyright© 1995-2012 MindSites Group / Privacy Policy

GeoCommunity™, Wireless Developer Network™, GIS Data Depot®, and Spatial News™
including all logos and other service marks
are registered trademarks and trade communities of
MindSites Group