source: trunk/mediafolder/c/audioshadow/audioshadowoverridenwpmethods.cpp@ 2

Last change on this file since 2 was 2, checked in by stevenhl, 8 years ago

Import sources from cwmm-full.zip dated 2005-03-21

File size: 2.8 KB
Line 
1/*
2 * This file is (C) Chris Wohlgemuth 2002-2003
3 *
4 * It's part of the CW-Multimedia classes distribution
5 */
6/*
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; see the file COPYING. If not, write to
19 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21
22#define INCL_DOSERRORS
23#define INCL_GPIBITMAPS
24
25#include "audioshadow.hh"
26#include <stdio.h>
27#include <stdlib.h>
28#include <string.h>
29#include "mediafolderres.h"
30//#include "mediafolderinc.h"
31
32
33extern HMODULE hResource;
34
35void errorResource();
36ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
37 char* title, ULONG ulTitleID, LONG lSizeTitle,
38 HMODULE hResource, HWND hwnd, ULONG ulFlags);
39void getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
40
41ULONG CWAudioShadow::wpQueryDetailsData(PVOID* ppDetailsData, PULONG pcp)
42{
43 WPObject *wpObject;
44 M_WPObject *mWPObject;
45 somId mySomId;
46 ULONG rc;
47
48 if((mySomId=somIdFromString(CWAUDIO_CLASS_NAME))!=NULLHANDLE) {
49 mWPObject=(M_WPObject*)SOMClassMgrObject->somClassFromId(mySomId);// Get CWAudio class object
50 SOMFree(mySomId);
51 wpObject=wpQueryShadowedObject(FALSE);//Get linked object
52#if 0
53 if(somIsObj(wpObject)) {
54 if(somResolveByName(wpObject,"wpQueryShadowedObject")){
55 /* Yes, it's a shadow. Query the linked object. */
56 DosBeep(5000, 200);
57 // wpObject=((WPShadow*)wpObject)->wpQueryShadowedObject(FALSE);
58 }
59 }
60#endif
61 if(somIsObj(wpObject)) {
62 if(wpObject->somIsA(mWPObject)) {/* Check if the object is of class CWAudio or descendent */
63 return wpObject->wpQueryDetailsData( ppDetailsData, pcp);
64 }
65 }
66 }
67
68 if((mySomId=somIdFromString("wpQueryDetailsData"))!=NULLHANDLE) {
69 rc=((somTD_WPObject_wpQueryDetailsData)
70 somParentNumResolve(__ClassObject->somGetPClsMtabs(),
71 1,
72 __ClassObject->
73 somGetMethodToken(mySomId))
74 )(this, ppDetailsData, pcp);
75 SOMFree(mySomId);
76 return rc;
77 }
78 else
79 return WPShadow::wpQueryDetailsData(ppDetailsData, pcp);
80
81}
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Note: See TracBrowser for help on using the repository browser.