flat assembler
Message board for the users of flat assembler.

flat assembler > High Level Languages > Programs without runtime in VS2005

Goto page Previous  1, 2, 3
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 15976
Location: Qo'noS
vivik wrote:
How can I import kernel32 functions by ordinal?
IIRC it isn't recommended due to the positions not being officially defined.
Post 08 Apr 2018, 11:30
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 362
Location: Belarus
vivik wrote:
How can I import kernel32 functions by ordinal? This link https://msdn.microsoft.com/en-us/library/e7tsx612.aspx says something about .def files, where are they in vs2005? What should I change in project options?

I’ll just say here that importing by ordinals is strongly discouraged by Microsoft due to the compotibility problems that do arise in this case.
Post 08 Apr 2018, 11:43
View user's profile Send private message Visit poster's website Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 425
do they arise, or they only might arise?
Post 08 Apr 2018, 13:42
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 15976
Location: Qo'noS
Isn't "might arise" enough? You have no guarantees. Why risk it? What is there to gain?
Post 08 Apr 2018, 13:53
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 362
Location: Belarus
vivik wrote:
do they arise, or they only might arise?

They do. Ordinals are subject to change between versions (and even service packs). So, it is going to work for you until a new update comes. And it will not work for anything except the OS version you use to get the ordinal values and those versions that just happen to have the same values.
Post 08 Apr 2018, 23:05
View user's profile Send private message Visit poster's website Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 425
>They do.

Examples?
Post 09 Apr 2018, 09:19
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 362
Location: Belarus
vivik wrote:
>They do.

Examples?

It’s like the first link in Google: StackOverflow question with accepted answer containing an example.

Explanation of why this may happen whenever anything changes, by Raymond Chen.
Post 09 Apr 2018, 12:46
View user's profile Send private message Visit poster's website Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 425
Oh, 99% of functions in kernel32.dll have different ordinals between windows vista and windows 7. Thanks.
Post 09 Apr 2018, 12:53
View user's profile Send private message Reply with quote
VEG



Joined: 06 Feb 2013
Posts: 78
Location: Minsk, Belarus
Why not Visual C++ 2017? Smile It also allows to write programs without runtime or with msvcrt.dll as runtime (with some limitations, of course). As the result small executables which work on Windows XP+ without additional external libraries are possible.

And yes, Visual Studio 2017 Community Edition is free, and it is similar to Visual Studio 2017 Professional.
Post 09 Apr 2018, 15:48
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 362
Location: Belarus
VEG wrote:
Why not Visual C++ 2017? Smile It also allows to write programs without runtime or with msvcrt.dll as runtime (with some limitations, of course). As the result small executables which work on Windows XP+ without additional external libraries are possible.

And yes, Visual Studio 2017 Community Edition is free, and it is similar to Visual Studio 2017 Professional.

<OffTop>The same applies to FASM, by the way. Except that FASM is not limited to WinXP+, not even limited to Windows.

People tend to use tools that are larger than all the software they will write in their whole lives and most features of which they do not use anyway. Why do such people consider assembly programmers strange? Smile</OffTop>
Post 09 Apr 2018, 19:19
View user's profile Send private message Visit poster's website Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 425
>Why not Visual C++ 2017?

My computer was made around 2005, even vs2010 lags. On the other hand, vs2005 works quite fast, 4 separate windows can work simultaniously. Compilation could be faster though, edit and continue takes 10 seconds to finish.

vs2010 actually was bearable. I think it only took too much time to start, but after that it was more or less fine. I don't quite remember.
Post 12 Apr 2018, 05:11
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2018, Tomasz Grysztar.

Powered by rwasa.