|
Windows Media is only supplied as DirectShow filters. There is no Video for Windows-compatible WMV codec. The two systems are entirely independent of each other. Some formats do have both a VfW codec and a DirectShow filter, but this is not required.
Windows Media Player supports using both the DirectShow and Video for Windows subsystems.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Ok, thank,
so which filter is reponsible for playing wmv3 encoded file ??
I'm using VCSwap and in the DirectShow Filters listing I can see two Windows Media Video Decoders (wmvds32.ax and wmv8ds32.ax) but it seems they come from Media Player 8 (wmv2).
|
|
|
|
|
I have a dialog, on that i have buttons, with each button i declare a veriable of type CShadeButtonST and call method SetShade(). The problem come when i close the dialog, that is i receive an error message, it is
"the instruction at "0x77f53d14" reference memory at "0x0000000010". The memory could not be "read" "
I try many method and found that the problem come form me thod SetShade(), if i don't call that method everything is ok.
Please tell me how to fix this problem.
Tran Thanh Binh
|
|
|
|
|
When I was compiling several .cpp files ,the error occurs :\vcsetup\vc98\include\ios(9) : fatal error C1083: Cannot open include file: 'streambuf': No such file or directory.what's the meaning?I think I have never made any change to that directory and such error didn't occur when compiling other MFC project.thanks!
|
|
|
|
|
Well, it should certainly be there. At a guess, at least one of the source files uses the <iostream> header, which depends on <ios> .
I'm afraid the solution is to reinstall Visual C++ 6.0.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Step 1: Softphone rings with callerid 01517077777 displayed.
Step 2: Myprog somehows gets the telephone number from the screen of the softphone and opens up IE http://domain.com/whoscalling.asp?callerid=01517077777
Any ideas on how I would start this?
|
|
|
|
|
The softphone i am using is X-Lite from X-ten. I have found that there is a log file window which displays the all the data I want as plain text. I can cut and paste within this window it's a bit like notepad
eg
So my prog needs to be able to read characters from another app's window. Could I write a VB or VC prog to pull data from another app like notepad?
|
|
|
|
|
Check FindWindow and GetWindowText
Use Spy ++ to find the arguments to FindWindow
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I tried FindWindow and that worked.
I can now check to see if X-lite is running. I am getting info back from FindWindow and getwindowtextlength but not getwindowtext. Also I think that that getwindowtext will only return the window title not the characters in the window?
I know this is VB and I am in the VC forum. Soory.
Private Sub mnuToolsFindWindow_Click()
'ToDo: Find the X-Lite Diagnostics Window
Dim hwnd As Long
Dim poo As Long
Dim lpString As String
Dim nMaxCount As Long
hwnd = FindWindow(vbNullString, "Diagnostics")
If hwnd = 0 Then
MsgBox "No"
Else
poo = GetWindowTextLength(hwnd) ' This returns 11 as you would expect
poo = GetWindowText(hwnd, lpString, nMaxCount) ' This return 0 with nothing in lpString
MsgBox "Yes"
MsgBox lpString
End If
End Sub
|
|
|
|
|
I have tried a program from this website windump
http://www.codeproject.com/cpp/windump.asp
and it will list all the current running windows. I need to get at the data within the window not just it's title.
For example if notepad was running how could I extract the characters in the notepad window?
|
|
|
|
|
Try
SendMessage with WM_GETTEXTLENGTH and WM_GETTEXT
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
hello there. i am assign into creating a standard configuration file and routines to implement this. what i did was create class associated with every application and the set the value in the file with the same format.
for example:
class app {
public:
int var1;
int var2;
app{
var1 = 0;
var2 = 1;
}
};
class CONFIG{
app a;
};
class CConfig{
CConfig(char * path);
public:
CONFIG config;
};
main()
{
CConfig * con;
con = new CConfig("configuration.cfg");
printf("%d",con->config.a.var1);
}
Configuration File;
[start]
config.a.var1 = 20;
config.a.var2 = 200;
[end]
my problem is how to associate every line of the configuration file to the elements of the class.
or my question would be how can i transform a string into a object. i already know how to convert object into string but i 'm still hesitant on looping every object and compare it to every line of the file.
|
|
|
|
|
I have a project in wich I use socket functions (AfxSocketInit is called at the very begining of the execution)... When the program calls getprotobyname, this function returns NULL (error code WSANO_DATA)...
Why this function fails?
More tips. The app works fine in other computer, so
Why this function fails in a computer and works in other?
Thanks
|
|
|
|
|
getprotobyname simply reads the protocol file - on Windows NT/2000/XP/2003 systems, this file lives in C:\Windows\System32\Drivers\etc . It's possible that the file has been corrupted, since the error code WSANO_DATA means that the name was found in the file, but some of the other data was missing.
I have to ask: why do you want to read from this file? It would only be useful if you were constructing raw IP packets. Perhaps you intended getservbyname instead?
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
thnk chris
I checked that before and the file is correct (even I copied that file from the computer that works fine to the one that doesn't).
The exact piece of code (a socket class wrapper) is:
struct protoent *ppe;
if(eType == eDGram)
ppe = getprotobyname("udp"); // 17
else
ppe = getprotobyname("tcp"); // 6
nProto = ppe->p_proto;
m_Socket = socket(PF_INET, eTipo, nProto);
I've got many apps working with this piece of code. If I replce that code with:
if(eType == eDGram)
nProto = IPPROTO_UDP;
else
nProto = IPPROTO_TCP;
m_Socket = socket(PF_INET, eTipo, nProto);
the class works.
The point is that I can't realize why the first code suddenly doesn't work
|
|
|
|
|
Juan Antonio Bermejo wrote:
thnk chris
oops... I mean 'Thnk mike'... your signature confused me...;P
|
|
|
|
|
As I said, probably an error in the protocol file.
These numbers really aren't going to change, because they're the protocol numbers defined originally by the IPv4 specification and now managed by IANA[^], the Internet Assigned Numbers Authority. These are the same for IPv6.
Just use the constants. It's easier and less prone to breaking.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi world...
What is the most useful way to change language in an application?
I've read we can do that with explicit link for DLL (one DLL for each languages ressource). Example:
- exported from french.dll file:
extern "C" __declspec(dllexport) char* get_text(int id_text);
- int the application:
typedef char* (MY_FUNCTION)(int);
HINSTANCE hInstance;
MY_FUNCTION *pFunction;
VERIFY(hInstance = ::Loadlibrary("c:\\winnt\\system32\\french.dll"));
VERIFY(pFunction = (MY_FUNCTION*) ::GetProcAddress(hInstance, "get_text"));
char* good_language = (pFunction*)(1054);
Is that a good solution?
Thanks for your suggestions...
Hello World!!!
from Raphaël
|
|
|
|
|
Maybe you have already found a solution. If not search MSDN for Resource-only DLLs and check for samples using the function AfxSetResourceHandle.
Hope it helps.
...Plug & Pray...
|
|
|
|
|
Thanks for your reply... I've already found this solution... But thank you nevertheless...
|
|
|
|
|
What kind of software can i use for developing a multilingual app in delphi?
I am thinking of using xml or dll. What are the differences pros and cons?
Can anyone please help me?
|
|
|
|
|
How can I tell which version of windows I am operating on? Is there an API call?
|
|
|
|
|
BOOL GetVersionEx(LPOSVERSIONINFO lpVersionInfo);
Declared in winbase.h, include windows.h to get it. MSDN has information on the OSVERSIONINFO struct (see below).
GetVersionEx[^]
Hope this helps.
--
Henrik Stuart (http://www.unprompted.com/hstuart/[^])
|
|
|
|
|
I am unable to synchronize the threads(simultaneous) greater when they are greater than 100. The thread increments a global Unsigned Long the requested num of times.
The code is....
// [5/4/2004] AS told by Marshall Brain.....
// thread 3
// very simple MULTI threaded prg...with CRITICAL SECTION synch'n method
// Prob ?? : Results are RANDOM ??
#include<windows.h>
#include<iostream.h>
volatile ULONG g_count = 0; // volatile so that compiler doesn't do any optimizations (like place it in a register)
// and we are able to alter the var. inside the thread also
const INT NoOfThreads = 10;
CRITICAL_SECTION CritSec;
void CountThread(INT Iterations)
{
INT i;
// UINT x;
Sleep(5000);
for( i=0; i
|
|
|
|
|
Not sure about this for loop?
for( i=0; i
{
// EnterCriticalSection (&CritSec);
// x = g_count;
//x++;
g_count++;
// LeaveCriticalSection (&CritSec);
}
But here, try this.
Static CRITICAL_SECTION CritSec;
For (i= 0; x < something; ++x)
{
x = g_count;
x++;
EnterCriticalSection (&CritSec);
g_count++; // This is global to all threads so lock this only.
LeaveCriticalSection (&CritSec);
}
So yes, you are right the answer would be random. If you don’t want random then do this.
Static CRITICAL_SECTION CritSec;
// This is global to all threads so lock the whole loop.
EnterCriticalSection (&CritSec);
For (i= 0; x < something; ++x)
{
x = g_count;
x++;
g_count++;
}
LeaveCriticalSection (&CritSec);
|
|
|
|