flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > Compatibility (MSVCRT.dll and MSVCR100.dll).

Author
Thread Post new topic Reply to topic
lamar



Joined: 05 Jun 2009
Posts: 16
lamar 02 Jan 2010, 20:51
Hello!
I wanna use time() function from the MSVCRT.dll.
I write the code:
Code:
#include <windows.h>
#include <time.h>

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
{
 DWORD Var1=time(0);
 if (Var1>=1) {MessageBox(0,0,0,0);
 return 0;
}
}    

On imports i see that: MSVCR100.dll,_time64 Sad
How to tell the compiler to use only MSVCRT.dll?
Post 02 Jan 2010, 20:51
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20415
Location: In your JS exploiting you and your system
revolution 02 Jan 2010, 20:53
lamar wrote:
Hello!
I wanna use time() function from the MSVCRT.dll.
I write the code:
Code:
Some C stuff    

On imports i see that: MSVCR100.dll,_time64 Sad
How to tell the compiler to use only MSVCRT.dll?


Q: How to tell the compiler to use only MSVCRT.dll?
A: Use fasm. Wink
Post 02 Jan 2010, 20:53
View user's profile Send private message Visit poster's website Reply with quote
lamar



Joined: 05 Jun 2009
Posts: 16
lamar 02 Jan 2010, 20:56
This is not the solution.
Post 02 Jan 2010, 20:56
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20415
Location: In your JS exploiting you and your system
revolution 02 Jan 2010, 20:58
Perhaps you wanted to post in the "High Level Languages" section?
Post 02 Jan 2010, 20:58
View user's profile Send private message Visit poster's website Reply with quote
lamar



Joined: 05 Jun 2009
Posts: 16
lamar 02 Jan 2010, 21:26
I found some information...
http://msdn.microsoft.com/en-us/library/abx4dbyh(VS.71).aspx
Can someone tell me what i do?
Post 02 Jan 2010, 21:26
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20415
Location: In your JS exploiting you and your system
revolution 02 Jan 2010, 21:38
lamar: The DLL linked depends upon the linker you use. Since there are about a million linkers out there then you should perhaps specify which linker you are using.

BTW: It should be in your linker documentation about DLL use and switches needed, etc.
Post 02 Jan 2010, 21:38
View user's profile Send private message Visit poster's website Reply with quote
lamar



Joined: 05 Jun 2009
Posts: 16
lamar 02 Jan 2010, 21:57
Fucking m$,i gonna use assembler.
Closed.
Post 02 Jan 2010, 21:57
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20415
Location: In your JS exploiting you and your system
revolution 02 Jan 2010, 22:11
Hehe.

Why use an existing DLL when you can drag in another DLL with duplicated functions and then require an installer for your exe?

It is just MS doing things the MS way.
Post 02 Jan 2010, 22:11
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 03 Jan 2010, 00:00
lamar: You need to link against proper MSVCRT.LIB (or MSVCRTD.LIB) file - one that is importing MSVCRT.DLL, not MSVCRXX.DLL. I think you can find such file in DDK, but I am not really sure.

Linking against VC runtime is really hell, especially since they introduced manifests.
Post 03 Jan 2010, 00:00
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.