|
Programming and Assembly Language Please read this Topic's rules!! |
![]() |
| LinkBack | Thread Tools | Rate Thread |
| ||||
![]() Hi all, As Re-volt X2 is progressing along nicely, i've been asked to add better PNG support. So i need a dll file that can handle PNG files without the security issues that MS had. I'll also need the command to be able to execute the dll. X2 already has lots of new features in it already but i really want to be able have the ability for it to handle PNG's as they are a very good file format IMO. So, if anyone could point me in the direction of one or design one for me, i would be grateful. Thanks, Scott.
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
| ||||
Is there not something on the PNG site you can use? http://www.libpng.org/pub/png/
__________________ It is by coffee alone I set my mind in motion... |
| ||||
It is for a program i'm making, the next version of Re-volt. My site is www.yowzagames-mark2.co.uk . It needs to be a dll or file that can be executed from one program and then add the support for PNG files.I did have a look at the list on libpng but couldn't find a free one that runs on win32, with read-only support. Also, i don't know the command for it to be executed like windows does with system dll's.
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
| ||||
I'm not sure I understand what your on about as far as the 'command for it to be executed like windows does with system dlls'? Windows doesn't execute dlls. An application loads a dll into its memory space using the LoadLib call, and then executes functions within the dll. Windows does provide the Rundll32 application, which is capable of loading dlls and then executing functions within those dlls, thus making it possible to build an application as a dll, but you still have to know the name of the function within the dll that you want to execute in most cases. |
| ||||
Did you try this one? http://members.cox.net/scottheiman/bmglib.htm Looks like the C++ code for a .dll, you would need to compile it before you can use it. |
| ||||
Oh i see a web browser very nice. Ummm do you mean that you want to dynamically load/unload the dll when it is required? Your'e most likely better off adding the png support directly into the program but that is up to you and i suppose loading/calling functions from specific dll's for this sort of thing can help with memory usage. EDIT: Danrok that one doesn't seem half bad it's a pity it doesn't have the capability of saving gif files though as that would be a usefull part of image support feature in the web browser.
__________________ |
| ||||
Last I checked, tools to save gif files required a royalty to be paid to the owner of the gif algorithm. |
| ||||
Yeah, i want it to be able to load and unload the dll when required. I wasn't sure how to write it, so i said executed. I will have a look at the link you provided though Danrok. (what's the new avatar all about then?) I'm also working on something so that users can block images from loading when required to speed up browsing and download. They can switch the function back on as well. That's still being thought out though. Most of the features are contained within the browser, it's just that i want to be able to have some new things in a dll. Also, you gave me an idea when you said functions gizmo. I'll talk about it later when i've thought about it a bit more.
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
| ||||
oh, right. Right, i've downloaded the file from the link you gave Danrok. I can see i need to lern C a bit more. Anyone point me in the direction of a 'C programming for dummies' style tutorial on the internet?
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
| ||||
Here are the results from a quick Google search. I can't recommend one, but I'm sure there are some decent ones in the list. If you are serious about learning C, get "The C Programming Language" by Brian W. Kernigan and Dennis M. Richie (the inventors of C). It is commonly referred to as the 'Kernigan and Richie' or 'K&R' reference. For C++, you want to get "The C++ Programming Language" by Bjarne Stroustrup, the inventor of C++ (also sometimes called 'C with Classes'). These are considered the bibles of the C/C++ programmer. They aren't cheap, by any means (about $100 for the pair, and not much less used), but they are well worth the money if you are going to be working in the language regularly. I know C# is considered to be all the rage right now, and it is ok if all you are writing is relatively trivial user apps, or need to prototype a UI quickly, but it is wholely inadequate for systems-level programming, nor is it possible to write cross-platform code in it. |
| ||||
just tried to download your first browser it wont run, probably my "special" pc, oh well........
__________________ AM2 X2 4000 2GB DDR2 NVIDIA 6150 ONBOARD! Join our F@H team today.. http://www.team45.info/ Are you a subscriber? No? well then, why not.... Subscribe to AOA for a better experience and faster downloads! How to unlock and overclock your Nvidia 6800 BIOS Volt-mod your 7800gt ![]() |
| ||||
did you get the error report message? this also happened to my dad who has a limited user account. Also, it is only designed for windows, and optimized for XP. I'm working on that in the next version although i can't guarantee any results. Ok, by using a tutorial i downloaded a few minutes ago, i've used a short 'enter a number' sample script which i'm modifying to try and make a simple MS-DOS program. Nothing much, just to at least start to get a feel for the language, it's the same way i learned HTML and batch and look how well i've done with those (i don't use batch much but it does have it's advantages for the 'fun' side of things, plus it's simple to learn). I'll post the C program when i've made a bit of progress with the learning. It is only my first attempt at C so it isn't going to be great.
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
| ||||
well, my first ever program made in C (re-volt wasn't made in C btw). I've posted it as an attachment below. I'm quite impressed to say it's my first attempt. It's a fake logon thing that runs in a DOS window. It doesn't really do any thing but simply outputs text based on your input. There's only one thing you need to know though, it only accepts numbers at this time because of the variable i've used. it uses %d which must be number, if i can find the text variable, i'll happily use that. The program is based on a template which i have modified heavily. Anyway, the program is posted below. Enjoy.
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
| ||||
Care to post the source code? |
| ||||
sure, this just goes in a blank c file and then needs compiling: Code: #include <stdio.h> /*-------- Well, i'm quite happy with the program. To say it's a first attempt and that i used a sample which was only 5-10 lines long, i'm quite impressed with myself. It's a simple way of pretending to log in using numbers. If you try to enter text part of the routine may be skipped. When you have entered the required number (no set numbers, just enter what you want), simply press return and read what it says. It tells you the numbers you entered, and even says thankyou for using the system! ------*/ int main() { int this_is_a_number; printf( "Welcome to AuthentiLog.\nTo initiate the login procedure, please press the enter key.", this_is_a_number ); getchar(); printf( "User number: " ); scanf( "%d", &this_is_a_number ); printf( "welcome user number %d.", this_is_a_number ); getchar(); int magic_number; scanf( "4", &magic_number ); printf( "PassNumber: ", magic_number ); scanf( "%d", &magic_number ); getchar(); printf( "Thankyou. ", magic_number ); getchar(); int sir_madam; printf( "Please enter verification number: " ); scanf( "%d", &sir_madam ); getchar(); printf( "Thankyou.", sir_madam ); getchar(); int number_list_confirm; printf( "Please confirm the numbers below are correct. " ); getchar(); printf( "UserNumber: %d. ", this_is_a_number ); getchar(); printf( "PassNumber: %d. ", magic_number ); getchar(); printf( "Verification Number: %d. ", sir_madam ); getchar(); /*--- scanf( "%d", &magic_number ); printf( "PassNumber: %d", magic_number ); getchar(); scanf( "%d", &sir_madam ); printf( "Verification Number: %d", sir_madam ); getchar(); ---*/ int number_final; printf( "\n", this_is_a_number ); printf( "Thankyou for using AuthentiLog user number %d.", this_is_a_number ); printf( "\nGoodbye user number %d.", this_is_a_number ); getchar(); }
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
| ||||
Ok. Change your int to a char array, something like this: char this_is_a_string[128]; change scanf("%d", &this_is_a_number); to scanf("%s", this_is_a_string); //no & symbol here, an array is automatically a pointer then change printf("%d", this_is_a_number); to printf("%s", this_is_a_string); Oh, and be aware that this code suffers severely from buffer overrun issues. |
| ||||
Quote:
![]() I was going to suggest a string, but forgot that strings have to be arrays...
__________________ It is by coffee alone I set my mind in motion... |
| ||||
Quote:
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Rate This Thread | |
| |
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
linux help required | skool h8r | OS, Software, Firmware, and BIOS | 5 | 31st July, 2006 05:10 AM |
New Athlon Cpu Required | surgeon | AMD Motherboards & CPUs | 15 | 18th November, 2005 05:29 PM |
More mentions required | dod | ThunderRd's AOA FOLDING@HOME Team | 4 | 8th October, 2004 08:47 PM |