|
Hi
How to convert DRM protected audio files to unprotected audio files. I have DRM protected audio files which are purchased from iTunes(i.e., from Apple website),i want to convert those DRM protected files to unprotected MPEG or AVI or WMV format files.
Bala
|
|
|
|
|
Please do not cross post. Also, DRM is there for a reason, don't try to violate the licenses you bought things under.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi Graus,
Converting DRM protected audio files to unprotected audio files is not a illegal thing. So please give some guidance to me.
How can u convert code of FORTRAN to C++ with out knowing the FORTRAN syntax
Regards,
Balu.
Bala
|
|
|
|
|
Hello,
After several problems with the link between a windows form and Fortran, I decided to install the Visual C++ 2005 Express Edition SP1, these problem were solved but now appear a new one. As I install Visual C++ 2005 Express Edition SP1 I have in my computer the folder
..\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 where the aplication get the dll msvcm80.dll,msvcp80.dll and msvcr80.dll
So I have a "circular" problem,
If I don't install the Visual C++ 2005 Express Edition SP1, I can't link with fortran, but If I install it and the conexion begins to work, nobody without the Visual C++ 2005 Express Edition SP1 (So without .NET 2005) can run the application, because there is no way to install these new versions of the dlls without installing the service pack.
There is any redistributable package that microsoft is going to release? or there is anyway to install only the dlls that I need?
Thanks in advance
|
|
|
|
|
|
Hello,
The problem is that if I
Build my application with the .NET 2005 with the SP1 installed, this application will not run in a computer without this SP1 installed, I have try this in a computer with VC++ 2005 redistributable package (x86), and it doesn't work, appear: Error code 14001
So I am trying to find a Redistributable package with the new versions in. Because I have add manually this dll (msvcm80.dll,msvcp80.dll and msvcr80.dll) in his new versions that are located at
..\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700
But if the computer where I want to run the application has not the .NET 2005 installed (so the SP1 for sure can't be installed), this will take the dll from the folder
..\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd which are the dll that VC++ 2005 redistributable package (x86) install inyour computer.
I am sure that something is write down in the register which point to one or another.
Regards
|
|
|
|
|
I'm not sure it's a good idea to rely on a certain folder to find the DLLs. This is the kind
of thing that leads to the whole "DLL Hell" thing.
I still suggest studying the deployment link I posted before. You may need to deploy the DLLs
to your own place where it is easier to access.
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Ok, it is true it is the real hell........
I think I'm going to wait for a new redistributable package of .NET 2005.....
Thanks
|
|
|
|
|
Can I send text from a BackgroundWorker::DoWork() to a listbox in the main thread ? I want to keep the listbox in the main thread up to date with what's going on in BackgroundWorker::DoWork(). The BackgroundWorker::ProgressChanged() hasn't the parameter I need ( String^ ) and if I send the text straight to the listbox, an exception is raised. If not, is there another way to do it ?
|
|
|
|
|
As a general rule you can only touch GUI objects from the thread that created them. Use BeginInvoke() method on the form to transfer the call to the GUI thread and update the listbox from there. Once in the GUI thread check for IsDisposed before updating the listbox as its possible for the form to be destroyed beteen you calling BeginInvoke and the actual function being called by the GUI thread
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
A garbage value is the answer but the code seems to be perfectly alright.
# include <iostream.h>
# include <conio.h>
void input_one(char *);
void main()
{
clrscr();
char string[20];
input_one(string);
cout<<"\n\n\n the string given is -> "<<string;
}
void="" input_one(char="" *solo)
{
="" char="" temp[20];
="" cout<<"\n="" \n="" enter="" the="" string="" -=""> ";
cin>>temp;
solo=temp;
}
|
|
|
|
|
You get garbage because instead of copying char temp[20] content to the char string[20], you set adress for char *solo to the first temp's array element.
Doing this: solo=temp; is exacly the same as: solo=&temp[0];
Remember: Array's name is always it's beginning adress.
And you should ask about it on Visual c++ forum.
|
|
|
|
|
Modify this to,
void input_one(char *);
void main()
{
clrscr();
char string[20] = {0};
input_one(string);
cout<<"\n\n\n the string given is -> "<<string;
}
void input_one(char *solo)
{
char temp[20] = {0};
cout<<"\n \n Enter the string -> ";
cin>>temp;
strcpy_s(solo,20,temp);
}
p.s. Use VC++ forum for such question , not involving CLI is any form.
-- modified at 23:04 Sunday 4th March, 2007
Other way is ,
void input_one(char *);
void main()
{
clrscr();
char string[20];
input_one(string);
cout<<"\n\n\n the string given is -> "<<string;
}
void input_one(char *solo)
{
cout<<"\n \n Enter the string -> ";
cin>>solo;
} -- modified at 23:07 Sunday 4th March, 2007
|
|
|
|
|
Zealous_Me wrote: What is wrong with this ? ? ?
maybe the abusive way you ask things...
do you realloy need to ask all in bold ??
are you sure your code deserves the C++/CLI forum ? for me, it leads to the Visual C++ only
|
|
|
|
|
Whats the easiest way to convert from System::String to std::string?
With value types it easy.
double a = 0.1;
System::Double b = a
double c = *reinterpret_cast<double^>(b);
For the time being I've just been using CStrings.....
System::String^ managed_string = "Hello World";
CString str = managed_string;
std::string std_string = str;
Not exactly slick though!!!
Just trying to get an idea of what it the most efficient way, and then I'll probably just create a macro for it.
|
|
|
|
|
<br />
#include < string ><br />
<br />
string os;<br />
String ^s;<br />
<br />
using namespace Runtime::InteropServices;<br />
const char* chars = <br />
(const char*)(Marshal::StringToHGlobalAnsi(s)).ToPointer();<br />
os = chars;<br />
Marshal::FreeHGlobal(IntPtr((void*)chars));
|
|
|
|
|
Thanks. Had just got it working along the same lines.
|
|
|
|
|
In a TCPListener program I've coded, I used the sample codes about TCPListener I found in MSDN Library. But, when I execute this program, the interface doesn't give any response to other events such as clicking buttons, since the continuous loop prevents the other codes to be run. I know that I must do multithreading, but I don't know how to do. . Meanwhile, I also tried to use "BackgroundWorker" component, but it caused the data transfer to fail. Here's sample code, what can I do?
private:
void ServerActivate()
{
try
{
Int32 port = 10000;
IPAddress^ localAddr = IPAddress::Parse(myipBox->Text);
TcpListener^ server = gcnew TcpListener(localAddr,port);
server->Start();
array<byte>^bytes = gcnew array<byte>(256);
String^ data = nullptr;
// Enter the listening loop.
while (true)
{
MessageBox::Show("Ready To Receive!");
TcpClient^ client = server->AcceptTcpClient();
NetworkStream^ stream = client->GetStream();
Int32 i;
while ( i = stream->Read( bytes, 0, bytes->Length ) )
{
data = System::Text::Encoding::ASCII->GetString( bytes, 0, i );
outputBox->Items->Add(data);
data = data->ToUpper();
array<byte>^msg = System::Text::Encoding::ASCII->GetBytes(data);
stream->Write( msg, 0, msg->Length );
}
client->Close();
}
}
catch (SocketException^ e)
{
MessageBox::Show("Socket Exception Occured!");
ShowLoginBox();
}
}
|
|
|
|
|
Nonreturn wrote: what can I do?
I suggest you find a multi-threading tutorial and deal with learning about multi-threading without any socket aspects. Once you understand what is involved in working with mulitple threads then dealing with the socket aspects should be easier.
led mike
|
|
|
|
|
Is there any tutorial u suggest ?
|
|
|
|
|
I own / read the First Edition and strongly recommend it.
Advanced Windows[^]
led mike
|
|
|
|
|
Dear all,
there are something wrong in the last message, the exactly source code is as below:
// 3964PROTOCOL.cpp : Defines the entry point for the console application.
//
#include <stdio.h>
#include <conio.h>
#include <io.h>
#include <fcntl.h>
#include <string.h>
#include <dos.h>
#include <bios.h>
#include "perce.h"
#define ESC 27
void interrupt(*oldvect_ser)();
extern void interrupt int_sio();
extern void restore_8250 (void);
extern void init_8250 (void);
extern void send_tele (char *, short);
extern WORD state, receive_counter, protocol_error;
extern BYTE receive_buffer[];
BYTE choice,sio_eoi;
BOOL receive, autosend;
WORD Com_basis,len;
BYTE send_buffer[BUFFER_MAX];
BYTE tmp_buffer[BUFFER_MAX];
BYTE *mode,*port;
/*=========================================================*/
void warte (void)
{
long i;
/* warte ein wenig */
for (i=0;i<500000;i++) i = i;
}
/*-----------------------------------------------------------------------
* MENUE
*-----------------------------------------------------------------------*/
void menue (void)
{
clrscr();
printf ("\n\n");
printf ("Final Version of KUKAVISION.EXE \n");
printf ("Serial device with 3964R protocol mod. P.S. 08.08.03\n\n");
printf ("[1] send teststring [4] COM 1 \n");
printf ("[2] getNum [5] COM 2 \n");
printf ("[3] getDat [6] reset protocol\n");
printf (" [ESC] quit\n");
printf ("Aktueller Port: %s\n",port);
printf ("Mode : %s\n", mode);
printf ("Number of elements: %d\n",numEl);
printf ("Element index: %d\n",elementIndex);
printf ("Element Data: %s\n---------\n", &send_buffer[0]);
}
/******************************
SEND_TELEGRAM
*******************************/
void send_telegram (BYTE *buffer)
{
if ((len = strlen (buffer)) > 0)
{
send_tele (buffer, len);
warte ();
warte ();
warte ();
if (state == E1)
{
state = RUHE;
protocol_error=2;
}
else protocol_error=6;
}
/*********************
MONITORING
**********************/
void monitoring (void)
{
short i;
printf("-> : ");
for (i=0;i<receive_counter;i++)
{
="" if(isprint(receive_buffer[i]))="" printf("%c",="" receive_buffer[i]);
="" else="" printf("0x%x",="" }=""
="" printf("\n");
="" receive="FALSE;
" }
="" *--------------------------------------------------------------------------
="" *="" function:="" main
="" hauptprogramm
="" *--------------------------------------------------------------------------*="" void="" main="" ()
="" int="" sio_int_nr,i;
="" j;="" sake="" char="" *fields;
="" bool="" quit="FALSE;
" com_basis="0x3F8" ;="" *standard-port="" com1="" sio_int_nr="0xC;" *irq*="" sio_eoi="0x
" port="COM 2" ;
="" oldvect_ser="getvect(sio_int_nr);
" setvect(sio_int_nr,int_sio);
="" state="RUHE;
" choice="protocol_error" =="" 0;
="" false;
="" mode="ready" elementindex="0;
" init_8250="" ();
="" menue="" do
="" if="" (bioskey(1))
="" switch="" (choice)
="" case="" esc:="" ganz="" raus="" break;
="" '1':="" send="" send_telegram="" (&send_buffer[0]);
="" '2':="" getnum="" strcpy(&receive_buffer[0],"getnum");
="" '3':="" getdat="" strcpy(&receive_buffer[0],"getdat");
="" '4':="" irq="" 4="" '5':="" com2="" '6':="" reset="" default:;
="" (receive)
="" monitoring="" ();="" (strcmp("getnum",&receive_buffer[0])="=" 0)="" printf("getnum="" erhalten\n");
="" if(="" imaqreadfile()="=" -1)
="" printf("fehler="" beim="" lesen="" der="" datei\n");
="" numel="imaqGetNbElements();" menue();
="" (strcmp("getdat",&receive_buffer[0])="=" if(elementindex=""> numEl){
printf("Keine Daten mehr vorhanden\n");
for (i=0;i<buffer_max;i++)
sprintf(&send_buffer[i],"\0");=""
="" imaqclose();
="" }
="" else="" {
="" dataerr="imaqGetData(elementIndex," send_buffer);
="" if="" (dataerr="=0)
" send_telegram="" (&send_buffer[0]);="" menue();
="" elementindex++;
="" (protocol_error)
="" switch="" case="" 1:
="" printf("\ncrc-error="" (nak-="">) !!\n");
break;
case 2:
printf("\nno response (DLE) !!\n");
break;
case 3:
printf("\nno send quitt (DLE) !!\n");
break;
case 4:
printf("\nReceive buffer overflow !!\n");
break;
case 5:
printf("\nrepeating telegram (->NAK) !!\n");
break;
case 6:
printf("\nno teststring defined\n");
break;
case 7:
printf("\nSTX\n");
break;
default:;
}
protocol_error = 0;
}
} while (!quit);
restore_8250 ();
setvect(sio_int_nr,oldvect_ser);
}
|
|
|
|
|
|
Dear all,
Now I have a problem with a small program Win32 console application for communication via RS232 with 3964 protocol, so anybody please help me compile this source code or show me what is wrong:
// 3964PROTOCOL.cpp : Defines the entry point for the console application.
//
#include <stdio.h>
#include <conio.h>
#include <io.h>
#include <fcntl.h>
#include <string.h>
#include <dos.h>
#include <bios.h>
#include "perce.h"
#define ESC 27
void interrupt(*oldvect_ser)();
extern void interrupt int_sio();
extern void restore_8250 (void);
extern void init_8250 (void);
extern void send_tele (char *, short);
extern WORD state, receive_counter, protocol_error;
extern BYTE receive_buffer[];
BYTE choice,sio_eoi;
BOOL receive, autosend;
WORD Com_basis,len;
BYTE send_buffer[BUFFER_MAX];
BYTE tmp_buffer[BUFFER_MAX];
BYTE *mode,*port;
/*=========================================================*/
void warte (void)
{
long i;
/* warte ein wenig */
for (i=0;i<500000;i++) i = i;
}
/*-----------------------------------------------------------------------
* MENUE
*-----------------------------------------------------------------------*/
void menue (void)
{
clrscr();
printf ("\n\n");
printf ("Final Version of KUKAVISION.EXE \n");
printf ("Serial device with 3964R protocol mod. P.S. 08.08.03\n\n");
printf ("[1] send teststring [4] COM 1 \n");
printf ("[2] getNum [5] COM 2 \n");
printf ("[3] getDat [6] reset protocol\n");
printf (" [ESC] quit\n");
printf ("Aktueller Port: %s\n",port);
printf ("Mode : %s\n", mode);
printf ("Number of elements: %d\n",numEl);
printf ("Element index: %d\n",elementIndex);
printf ("Element Data: %s\n---------\n", &send_buffer[0]);
}
/******************************
SEND_TELEGRAM
*******************************/
void send_telegram (BYTE *buffer)
{
if ((len = strlen (buffer)) > 0)
{
send_tele (buffer, len);
warte ();
warte ();
warte ();
if (state == E1)
{
state = RUHE;
protocol_error=2;
}
else protocol_error=6;
}
/*********************
MONITORING
**********************/
void monitoring (void)
{
short i;
printf("-> : ");
for (i=0;i<receive_counter;i++)
{
="" if(isprint(receive_buffer[i]))="" printf("%c",="" receive_buffer[i]);
="" else="" printf("0x%x",="" }=""
="" printf("\n");
="" receive="FALSE;
" }
="" *--------------------------------------------------------------------------
="" *="" function:="" main
="" hauptprogramm
="" *--------------------------------------------------------------------------*="" void="" main="" ()
="" int="" sio_int_nr,i;
="" j;="" sake="" char="" *fields;
="" bool="" quit="FALSE;
" com_basis="0x3F8" ;="" *standard-port="" com1="" sio_int_nr="0xC;" *irq*="" sio_eoi="0x
" port="COM 2" ;
="" oldvect_ser="getvect(sio_int_nr);
" setvect(sio_int_nr,int_sio);
="" state="RUHE;
" choice="protocol_error" =="" 0;
="" false;
="" mode="ready" elementindex="0;
" init_8250="" ();
="" menue="" do
="" if="" (bioskey(1))
="" switch="" (choice)
="" case="" esc:="" ganz="" raus="" break;
="" '1':="" send="" send_telegram="" (&send_buffer[0]);
="" '2':="" getnum="" strcpy(&receive_buffer[0],"getnum");
="" '3':="" getdat="" strcpy(&receive_buffer[0],"getdat");
="" '4':="" irq="" 4="" '5':="" com2="" '6':="" reset="" default:;
="" (receive)
="" monitoring="" ();="" (strcmp("getnum",&receive_buffer[0])="=" 0)="" printf("getnum="" erhalten\n");
="" if(="" imaqreadfile()="=" -1)
="" printf("fehler="" beim="" lesen="" der="" datei\n");
="" numel="imaqGetNbElements();" menue();
="" (strcmp("getdat",&receive_buffer[0])="=" if(elementindex=""> numEl){
printf("Keine Daten mehr vorhanden\n");
for (i=0;i<buffer_max;i++)
sprintf(&send_buffer[i],"\0");=""
="" imaqclose();
="" }
="" else="" {
="" dataerr="imaqGetData(elementIndex," send_buffer);
="" if="" (dataerr="=0)
" send_telegram="" (&send_buffer[0]);="" menue();
="" elementindex++;
="" (protocol_error)
="" switch="" case="" 1:
="" printf("\ncrc-error="" (nak-="">) !!\n");
break;
case 2:
printf("\nno response (DLE) !!\n");
break;
case 3:
printf("\nno send quitt (DLE) !!\n");
break;
case 4:
printf("\nReceive buffer overflow !!\n");
break;
case 5:
printf("\nrepeating telegram (->NAK) !!\n");
break;
case 6:
printf("\nno teststring defined\n");
break;
case 7:
printf("\nSTX\n");
break;
default:;
}
protocol_error = 0;
}
} while (!quit);
restore_8250 ();
setvect(sio_int_nr,oldvect_ser);
}
|
|
|
|
|
1. Use <pre> tags while posting code.
2. Post only relevent code, and describe what problem you are facing , nobody is going to see huge amount of code for you.
3. Ask is correct fourm. In this case its VC++[^].
Prasad
Notifier using ATL | Operator new[],delete[][^]
|
|
|
|
|