![]() |
#1 |
Junior Member
|
Devc++ to Visual c++ codes not working ??
// Clear TAG
cleartag() { #define MSNMusicString L"\\0Music\\0%d\\0%s\\0%s\\0%s\\0%s\\0%s\\0" #define MSNFormat L"{0} - {1}" HWND msnui = NULL; COPYDATASTRUCT msndata; CHAR buffer[500]; wsprintfW(buffer, MSNMusicString,0, L"", L"", L"", L"", L""); msndata.dwData = 0x547; msndata.lpData = &buffer; msndata.cbData = (lstrlenW(buffer)*2)+2; while (msnui = FindWindowEx(NULL, msnui, "MsnMsgrUIManager", NULL)) { SendMessage(msnui, WM_COPYDATA, (WPARAM)NULL, (LPARAM)&msndata); } } this code is successfully compiled in devc++ but i couldt compile it with visual c++, does any one knows why? it gives tons off error first error given in HWND line |
![]() |
![]() |
![]() |
#2 |
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
Are you sure this is correct:
PHP Code:
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
![]() |
![]() |
![]() |
#3 |
Join Date: Sep 2003
Posts: 27,873
|
and those errors would be...? without knowing the error you can't really expect an answer since that code looks ok from what i can tell. did you make sure you included all relevant header files, etc
-daz |
![]() |
![]() |
![]() |
#4 |
Junior Member
|
--------------------Configuration: myim - Win32 Debug--------------------
Compiling resources... Compiling... myim.c c:\program files\microsoft visual studio\myprojects\myim\myim.c(34) : error C2275: 'HWND' : illegal use of this type as an expression c:\program files\microsoft visual studio\vc98\include\windef.h(195) : see declaration of 'HWND' c:\program files\microsoft visual studio\myprojects\myim\myim.c(34) : error C2146: syntax error : missing ';' before identifier 'msnui' c:\program files\microsoft visual studio\myprojects\myim\myim.c(34) : error C2065: 'msnui' : undeclared identifier ------------------------------------------------------------ error is like that.. i can compile the same project with dev-c++, but i want to use resource files so that i click new dynamic dll on visual c++ 6.0 and then i add my header and c file, but when i try to compile it, it gives this error note: my headers #include <windows.h> #include "myim.h" |
![]() |
![]() |
![]() |
#5 |
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
Try this:
PHP Code:
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
![]() |
![]() |
![]() |
#6 | |
Junior Member
|
Quote:
![]() --------------------Configuration: myim - Win32 Debug-------------------- Compiling... myim.c C:\Program Files\Microsoft Visual Studio\MyProjects\myim\myim.c(51) : warning C4013: 'cleartag' undefined; assuming extern returning int C:\Program Files\Microsoft Visual Studio\MyProjects\myim\myim.c(62) : error C2275: 'HWND' : illegal use of this type as an expression c:\program files\microsoft visual studio\vc98\include\windef.h(195) : see declaration of 'HWND' C:\Program Files\Microsoft Visual Studio\MyProjects\myim\myim.c(62) : error C2146: syntax error : missing ';' before identifier 'msnui' C:\Program Files\Microsoft Visual Studio\MyProjects\myim\myim.c(62) : error C2065: 'msnui' : undeclared identifier |
|
![]() |
![]() |
![]() |
#7 |
Junior Member
|
i am too stupid, i find the error my source code name is myim.c not myim.cpp :P thanks for your helps
|
![]() |
![]() |
![]() |
#8 |
Junior Member
|
when i changed the source file's extension .c to cpp my code is working but winamp couldnt recognize the plugin, does any one have suggestion?
|
![]() |
![]() |
![]() |
#9 | |
Forum King
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Junior Member
|
i search in the form and i learn that i had to put extern "C", i have another question is there any way to make smaller files.. same code when i compile with dev-c++ it become 21 kb, when i compile the same code with visual c++ 2005 code size become 40 kb, how can i reduce the file size?
|
![]() |
![]() |
![]() |
#11 | |
Forum King
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#12 | |
Junior Member
|
Quote:
|
|
![]() |
![]() |
![]() |
#13 | |
Forum King
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
|
Quote:
![]() Btw I see you're running Visual Studio 2005. I tried it but found it so damn slow...took like several minutes to compile anything...and everything is deprecated (eh...dunno spelling) and thus gives warnings. So, nah I didn't like it. But you do? ![]() |
|
![]() |
![]() |
![]() |
#14 |
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
I use Libctiny.lib.... google-it
![]() * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
![]() |
![]() |
![]() |
#15 |
Junior Member
|
i prefer visual studio for resource editing :P after that i compile it with dev-c++ :P much better and small file size
![]() ![]() ![]() |
![]() |
![]() |
![]() |
#16 |
Junior Member
|
vs2005 optimized plugins couldnt detected by winamp in some computers does any one have idea about that? libtiny wanted libc.lib.. in visual studio 2005
![]() |
![]() |
![]() |
![]() |
#17 |
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
Libctiny, void some crt... basically I use Multithreaded DLL, with it... maybe you need to add some old and fusy msvcrt.lib
![]() * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
![]() |
![]() |
![]() |
#19 |
Junior Member
|
i send the compiled dll files.. they have the same code and nearly same resource.. can u check them for me and give me some suggestions?
|
![]() |
![]() |
![]() |
#20 | |
Junior Member
|
Quote:
![]() ![]() |
|
![]() |
![]() |
![]() |
#21 |
Join Date: Sep 2003
Posts: 27,873
|
GEN_IM(NOT WORKING ON SOME COMPUTERS OPTIMIZED VS2005).DLL - missing MSVCR80.DLL which is why that's failing. when you distribute the plugin you'd either need to bundle that dll with it and install it into the root winamp folder or you build the plugin dll statically (which would up the dll size but it'll work on any system that way).
the other two builds check out fine on the dll dependancy count. -daz |
![]() |
![]() |
![]() |
#22 |
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
But that would be increasing installation size
![]() I like Visual Studio 6.0, because the compiler is so dump <- ![]() ![]() Although, you still needing msvcrt.dll (which comes BTW since Win95 OS2) ![]() * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
![]() |
![]() |
![]() |
#23 |
Join Date: Sep 2003
Posts: 27,873
|
true but that's what happens when using the crt/any related functions to it. this is another reason i won't mess around with msvc above v6.
with the msvcrt.dll, it's safe to assume that it'll be present in all cases since if that's not present you're unlikely even to have winamp let alone the rest of windows working correctly ![]() -daz |
![]() |
![]() |
![]() |
#24 | |
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
Quote:
![]() * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
![]() |
![]() |
![]() |
#25 |
Join Date: Sep 2003
Posts: 27,873
|
true, which is what i do for atoi, strnicmp, etc
![]() -daz |
![]() |
![]() |
![]() |
#26 |
Junior Member
|
newbie solution
![]() ![]() ![]() ![]() |
![]() |
![]() |
![]() |
#27 |
Junior Member
|
i forgot to attach my file, it can swap title-song name, have show on pause feauture and dont show video files titles on msn, sometimes its not good to see video files by others especially when i forgot nowplaying open in msn
![]() |
![]() |
![]() |
![]() |
#28 |
Forum Pirate
Beta Team Join Date: Oct 2001
Posts: 2,032
|
vc2005 uses alot more than just msvcr80.dll even tho depeneds.exe says thats all it needs.
vc2005 creates WinSxS bianrys (not totaly sure what it means, but its something to do with x86 binarys working on x86, x86_64, and itanium versions of windows, without having to use the slow assed emulation layer). most people who keep fully upto date on windows xp updates (sp2 and everything after it) should already have WinSxS dll's. for those who dont click here for the installer for the package to install most of them (all the needed ones) |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|