Jump to content

(Dev-Cpp Question)


layer
 Share

Recommended Posts

:"> i just turned on debug in Dev-C++ and its riving me insane because im making a smaller Dll then my Math.dll and now it is 277KB !!! how exactly do I turn off the debugger info on it? :lmao: thanks, and one more question... im making a dll for someone who wants to write things to a console created.. and i looked at Larry's TCP dll and saw for a variable(?) he used szSomethingHere, so thats what i tried to do... heres the code :"> (theres more but im only includuing the stuff i actually wrote)

#include "dll.h"
#include <windows.h>
#include <cstdlib>
#include <iostream>
using namespace std;

extern "C"__declspec(dllexport) int CreateConsole (char* szWhat2Write, char /n, int argc, char *argv[])  \\ do i need char /n?
{
       cout << szWhat2Write; \\ quotes around szWhat2Write??
       cout << " /n";
       system("pause");
       return 0;
}

if i am being really annoying with all of this Dll stuff... then just tell me, because i feel like i am o:) but at least could you answer my first question about the debugger? and please the second question about the code? (the code compiled ok, but just the "cout" stuff isnt working)

thanks!!!! :)

EDIT: and also, this is how i tested it...

$test= DllCall ("AutoItConsoleWrite.dll", "int", "CreateConsole", "char", "Testing")
; ^ that doesnt work, the below code does except with no "Testing" printed out on the console
$test= DllCall ("AutoItConsoleWrite.dll", "int", "CreateConsole")
Edited by layer
FootbaG
Link to comment
Share on other sites

:"> i just turned on debug in Dev-C++ and its riving me insane because im making a smaller Dll then my Math.dll and now it is 277KB !!! how exactly do I turn off the debugger info on it? :lmao:  thanks, and one more question... im making a dll for someone who wants to write things to a console created.. and i looked at Larry's TCP dll and saw for a variable(?) he used szSomethingHere, so thats what i tried to do... heres the code :">  (theres more but im only includuing the stuff i actually wrote)

#include "dll.h"
#include <windows.h>
#include <cstdlib>
#include <iostream>
using namespace std;

extern "C"__declspec(dllexport) int CreateConsole (char* szWhat2Write, char /n, int argc, char *argv[])  \\ do i need char /n?
{
       cout << szWhat2Write; \\ quotes around szWhat2Write??
       cout << " /n";
       system("pause");
       return 0;
}

if i am being really annoying with all of this Dll stuff... then just tell me, because i feel like i am o:)  but at least could you answer my first question about the debugger? and please the second question about the code? (the code compiled ok, but just the "cout" stuff isnt working)

thanks!!!! :)

<{POST_SNAPBACK}>

Aren't you missing a semi-colon after the "Extern" line, before your // remark??

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

noo, i dont think so, thats how it should be, unless you mean something different? (and plus, the compiler would have yelled at me)

<{POST_SNAPBACK}>

Meh, Ok. I'll leave it to the pros, it's been too long since I did anything in C.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Learn the language. By your question, you clearly don't know anything about even the basic types in C++. And now you're trying to write DLL's with zero knowledge of the language you're using. How's that working out so far? Not too well? Think maybe learning the language first would be a better start?

And in regards to debugging, read the documentation for your compiler. If you're going to even be half-decent at this, you're going to have to read the docs for your compiler of choice.

Link to comment
Share on other sites

just when i thought i was on a roll o:) (nothing)

<{POST_SNAPBACK}>

LOL. I backed out early myself. I know nothing but the most basic structure of C so, that's why I only suggested the most common error. :)

I was wondering when Valik would come swinging his velvet sledgehammer..... :lmao:

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

LOL.  I backed out early myself.  I know nothing but the most basic structure of C so, that's why I only suggested the most common error.  o:)

I was wondering when Valik would come swinging his velvet sledgehammer..... :lmao:

<{POST_SNAPBACK}>

hehe, maybe im just better off writing a C++ program instead of trying to do a DllCall :):whistle::) cause i cant find a good tutorial site :)
FootbaG
Link to comment
Share on other sites

hehe, maybe im just better off writing a C++ program instead of trying to do a DllCall :)  :)  :lmao: cause i cant find a good tutorial site o:)

<{POST_SNAPBACK}>

Not offense, but take in consideration Valik's advice. Learn the language. This will help him to have a better understanding of other things for your DLL. :)

agrh..I can't remember a link for tutorial right now.

Link to comment
Share on other sites

Umm, maybe I missed some of the thread, but somewhere in this jumble I heard someone asking for some good C++ tutorials. Being a C programmer myself(long before I knew about AutoIt)I have compiled quite a bit of sites. Here is a list I posted on www.realmgx.com not so long ago(I am mason on there).

General References

Code Project

MSDN

Secret Website :lmao:

http://www.cppreference.com/

http://www.cplusplus.com/ref/

http://www.parashift.com/c++-faq-lite/

Beginners

http://hellnet.perverz.hu/ebookz/C++%20in%...ys/htm/ch01.htm

http://www.fredosaurus.com/notes-cpp/

http://www.open-std.org/jtc1/sc22/open/n2356/

http://www.kuzbass.ru:8086/docs/isocpp/

http://www.research.att.com/~bs/bs_faq2.html

Win32 API

theForger's Win32 API Tutorial

FoosYerDoos

GameTutorials's Win32 Tutorials

Sunlight

FunctionX

Reliable Software

Catch22 Productions

from the ground up

Fallout Software

Game Development

http://nehe.gamedev.net/

http://www.programmersheaven.com

http://www.ultimategameprogramming.com/index2.php

Forums

http://cpp-home.com/forum/

http://www.programmingforums.org/

http://www.gamedev.net

http://www.gametutorials.com

I hope this helps in your journey throught C++, if you start one. Personally, I hope you do, although AutoIt is amazing for a scripting language, and amazing compared to some normal languages, C++ is a very powerful tool that can be used on just about any project.

Link to comment
Share on other sites

Go to the library and check out Steve Oualline's Practical C++ Programming (the Chipmunk Book). It's pretty Linux-centric, but it tells you what it's all about...

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Link to comment
Share on other sites

Excellent post, Encryption :lmao:

Layer, C++ is pretty hard... don't dive into it TOO fast. Set a nice goal though.

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to comment
Share on other sites

ill admit it, im eager and ready to roar, so, when i ask a noob question and my C++ code looks like crap, just say something, thanks o:)

<{POST_SNAPBACK}>

You're asking noobyish questions and your C++ code looks like crap that's just been stepped on by Valik.....There, happy now? :lmao:

BUT, don't be discouraged! Keep plugging away and do take advice from people who in the know, such as those who have posted here. The best way to learn is through sheer bloody hard work. (Bloody hell, I sound like my dad :) )

Edited by pacman
Link to comment
Share on other sites

extern "C"__declspec(dllexport) int CreateConsole (char* szWhat2Write, char /n, int argc, char *argv[])  \\ do i need char /n?

Does this really compile? IIRC the slash character is not permitted in identifier names.

Ignorance is strength.

Link to comment
Share on other sites

i made up the char /n, thats not really in the compiled version of the Dll, thats why i put it here to see if anyone would notice :lmao:

<{POST_SNAPBACK}>

OK, I get it: You're not really a teenager trying to learn, but rather a member of the C++ standards committeee who only posts here to try and troll Valik o:)

Ignorance is strength.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...