forums Computer Tutorials Computer Help and Spyware Removal File DatabaseUninstall Database Windows Startup Programs Database Computer Resources Computer Glossary Forums Computer Help and Spyware Removal
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

 
Reply to this topicStart new topic
> Starting To Learn Dlls, Using Dev-C++
zyrolasting
post May 17 2008, 01:03 AM
Post #1


Member
**

Group: Members
Posts: 33
Joined: 14-May 08
Member No.: 209,042



I went utterly crazy.gif when I looked at the DLL skeleton for C script in Dev-C++ 4.9.9.2 . I suddenly understood nothing.
My question is, how is any form of code implemented into the skeleton, and sent out? Here is the template.

CODE
#ifndef _DLL_H_
#define _DLL_H_

#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */


DLLIMPORT void HelloWorld (void);


#endif /* _DLL_H_ */


I'm to GUESS that dllexport exposes the code to apps, but I think in order to get me on the right track I need to ask a reworded question. If I write a script, where would it go and how would it's returned value go to dllexport? Is that by using return in main?
I have novice experience in C and can understand basic scripts, but am just starting on this. Please explain this to me so I can understand it?

This post has been edited by zyrolasting: May 17 2008, 01:04 AM
Go to the top of the page
 
+Quote Post
zyrolasting
post May 18 2008, 02:13 PM
Post #2


Member
**

Group: Members
Posts: 33
Joined: 14-May 08
Member No.: 209,042



I'm so sorry about the double post, but for some reason the Edit button is not showing up even with me logged in. Why is this...?

Anyway, I have found more basic knowledge after refining a Google search, but have a new question.

#define DllImport __declspec( dllimport )
#define DllExport __declspec( dllexport )

DllExport void func();
DllExport int i = 10;
DllImport int j;
DllExport int n;

I found this snip as an example for the use.
In DLLEXPORT, when n is declared, how does that get exported...? Is it exported as an uninitialized variables? If so, how is that used?
For the record, Google isn't helping so much. I'm reading up on it, but outside help is appreciated.
Go to the top of the page
 
+Quote Post
KoanYorel
post May 18 2008, 02:17 PM
Post #3


Bleepin' Conundrum
******

Group: Global Moderator
Posts: 8,379
Joined: 26-April 04
From: 65 miles due East of the "Logic Free Zone", in Md, USA
Member No.: 235



After 24 hours - one cannot edit a post. So don't worry about the back-to-back posts.

Sorry I can't answer your other questions. Another will be along soon. Please be patient.


--------------------
"The only easy day was yesterday!"

ThoughtVent X-press yourself?
Go to the top of the page
 
+Quote Post
zyrolasting
post May 18 2008, 02:21 PM
Post #4


Member
**

Group: Members
Posts: 33
Joined: 14-May 08
Member No.: 209,042



Alright, thank you. But my edit button for that post I made 10 minutes ago is now unavailable as well.
Can browser settings interfere with that?
Go to the top of the page
 
+Quote Post
KoanYorel
post May 18 2008, 02:22 PM
Post #5


Bleepin' Conundrum
******

Group: Global Moderator
Posts: 8,379
Joined: 26-April 04
From: 65 miles due East of the "Logic Free Zone", in Md, USA
Member No.: 235



Ooops, I forgot to note that once another reply has been made, you also lose the edit function. Sorry about that.


--------------------
"The only easy day was yesterday!"

ThoughtVent X-press yourself?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 6th July 2008 - 04:41 PM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.