• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ dprintf1函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中dprintf1函数的典型用法代码示例。如果您正苦于以下问题:C++ dprintf1函数的具体用法?C++ dprintf1怎么用?C++ dprintf1使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了dprintf1函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: dprintf1

JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_Secmod_nssLoadLibrary
  (JNIEnv *env, jclass thisClass, jstring jName)
{
    HINSTANCE hModule;
    LPVOID lpMsgBuf;

    const char *libName = (*env)->GetStringUTFChars(env, jName, NULL);
    dprintf1("-lib %s\n", libName);

    hModule = LoadLibrary(libName);
    (*env)->ReleaseStringUTFChars(env, jName, libName);

    if (hModule == NULL) {
        FormatMessage(
            FORMAT_MESSAGE_ALLOCATE_BUFFER |
            FORMAT_MESSAGE_FROM_SYSTEM |
            FORMAT_MESSAGE_IGNORE_INSERTS,
            NULL,
            GetLastError(),
            0, /* Default language */
            (LPTSTR) &lpMsgBuf,
            0,
            NULL
        );
        dprintf1("-error: %s\n", lpMsgBuf);
        JNU_ThrowIOException(env, (char*)lpMsgBuf);
        LocalFree(lpMsgBuf);
        return 0;
    }
    dprintf2("-handle: %d (0X%X)\n", hModule, hModule);
    return (jlong)hModule;
}
开发者ID:michalwarecki,项目名称:ManagedRuntimeInitiative,代码行数:32,代码来源:j2secmod_md.c


示例2: test7

static int
test7(gs_state * pgs, gs_memory_t * mem)
{
    /* Define a non-monotonic 4 x 4 halftone with 4 gray levels. */
    static const byte masks[1 * 4 * 4] =
    {
    /* 0% */
        0x00, 0x00, 0x00, 0x00,
    /* 25% */
        0x80, 0x40, 0x20, 0x10,
    /* 50% */
        0xa0, 0xa0, 0x50, 0x50,
    /* 75% */
        0xd0, 0xe0, 0x70, 0xb0
    };
    gs_ht *pht;
    int code;
    int i;

    /* Fabricate a Type 5 halftone. */
    code = gs_ht_build(&pht, 1, mem);
    dprintf1("ht build code = %d\n", code);
    code = gs_ht_set_mask_comp(pht, 0,
                               4, 4, 4, masks, NULL, NULL);
    dprintf1("set mask code = %d\n", code);
    code = gs_sethalftone(pgs, pht);
    dprintf1("sethalftone code = %d\n", code);
    for (i = 0; i <= 4; ++i) {
        gs_setgray(pgs, i / 4.0);
        fill_rect1(pgs, 100 + i * 100, 100, 50, 50);
    }
    return 0;
}
开发者ID:BorodaZizitopa,项目名称:ghostscript,代码行数:33,代码来源:gslib.c


示例3: dprintf1

JNIEXPORT jobjectArray JNICALL Java_sun_security_smartcardio_PCSC_SCardListReaders
    (JNIEnv *env, jclass thisClass, jlong jContext)
{
    SCARDCONTEXT context = (SCARDCONTEXT)jContext;
    LONG rv;
    LPTSTR mszReaders = NULL;
    DWORD size = 0;
    jobjectArray result;

    dprintf1("-context: %x\n", context);
    rv = CALL_SCardListReaders(context, NULL, NULL, &size);
    if (handleRV(env, rv)) {
        return NULL;
    }
    dprintf1("-size: %d\n", size);

    if (size) {
        mszReaders = malloc(size);
        if (mszReaders == NULL) {
            throwOutOfMemoryError(env, NULL);
            return NULL;
        }

        rv = CALL_SCardListReaders(context, NULL, mszReaders, &size);
        if (handleRV(env, rv)) {
            free(mszReaders);
            return NULL;
        }
        dprintf1("-String: %s\n", mszReaders);
    }

    result = pcsc_multi2jstring(env, mszReaders);
    free(mszReaders);
    return result;
}
开发者ID:lmsf,项目名称:jdk9-dev,代码行数:35,代码来源:pcsc.c


示例4: trace_drawing_color

static void
trace_drawing_color(const char *prefix, const gx_drawing_color *pdcolor)
{
    dprintf1("%scolor=", prefix);
    if (pdcolor->type == gx_dc_type_none)
        dputs("none");
    else if (pdcolor->type == gx_dc_type_null)
        dputs("null");
    else if (pdcolor->type == gx_dc_type_pure)
        dprintf1("0x%lx", (ulong)pdcolor->colors.pure);
    else if (pdcolor->type == gx_dc_type_ht_binary) {
        int ci = pdcolor->colors.binary.b_index;

        dprintf5("binary(0x%lx, 0x%lx, %d/%d, index=%d)",
                 (ulong)pdcolor->colors.binary.color[0],
                 (ulong)pdcolor->colors.binary.color[1],
                 pdcolor->colors.binary.b_level,
                 (ci < 0 ? pdcolor->colors.binary.b_ht->order.num_bits :
                  pdcolor->colors.binary.b_ht->components[ci].corder.num_bits),
                 ci);
    } else if (pdcolor->type == gx_dc_type_ht_colored) {
        ulong plane_mask = pdcolor->colors.colored.plane_mask;
        int ci;

        dprintf1("colored(mask=%lu", plane_mask);
        for (ci = 0; plane_mask != 0; ++ci, plane_mask >>= 1)
            if (plane_mask & 1) {
                dprintf2(", (base=%u, level=%u)",
                         pdcolor->colors.colored.c_base[ci],
                         pdcolor->colors.colored.c_level[ci]);
            } else
                dputs(", -");
    } else {
开发者ID:BorodaZizitopa,项目名称:ghostscript,代码行数:33,代码来源:gdevtrac.c


示例5: vbi_proxy_msg_finish_connect

/* ----------------------------------------------------------------------------
** Check for the result of the connect syscall
** - UNIX: called when select() indicates writability
** - Win32: called when select() indicates writablility (successful connected)
**   or an exception (connect failed)
*/
vbi_bool vbi_proxy_msg_finish_connect( int sock_fd, char ** ppErrorText )
{
   vbi_bool result = FALSE;
   int sockerr;
   socklen_t sockerrlen;

   sockerrlen = sizeof(sockerr);
   if (getsockopt(sock_fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &sockerrlen) == 0)
   {
      if (sockerr == 0)
      {  /* success -> send the first message of the startup protocol to the server */
         dprintf2("finish_connect: socket connect succeeded\n");
         result = TRUE;
      }
      else
      {  /* failed to establish a connection to the server */
         dprintf1("finish_connect: socket connect failed: %s\n", strerror(sockerr));
         asprintf(ppErrorText, _("Cannot connect to server: %s."),
		      strerror(sockerr));
      }
   }
   else
   {
      dprintf1("finish_connect: getsockopt: %s\n", strerror(errno));
      asprintf(ppErrorText, _("Socket I/O error: %s."),
		   strerror(errno));
   }

   return result;
}
开发者ID:AndroNN,项目名称:libzvbi-obe-dev,代码行数:36,代码来源:proxy-msg.c


示例6: gslt_alloc_print_leaks

void
gslt_alloc_print_leaks(void)
{
    dprintf1("number of allocs: %d\n", num_alloc_called);
    dprintf1("number of frees: %d\n", num_free_called);
    dprintf1("number of resizes: %d\n", num_resize_called);
    dprintf1("number of leaked chunks: %d\n", num_alloc_called - num_free_called);
}
开发者ID:ststeiger,项目名称:ghostsvg,代码行数:8,代码来源:gslt_alloc.c


示例7: debug_dump_bytes

/* Dump a region of memory */
void
debug_dump_bytes(const byte *from, const byte *to, const char *msg)
{	const byte *p = from;
	if ( from < to && msg )
		dprintf1("%s:\n", msg);
	while ( p != to )
	   {	const byte *q = min(p + 16, to);
		dprintf1("%lx:", (ulong)p);
		while ( p != q ) dprintf1(" %02x", *p++);
		dputc('\n');
	   }
}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:13,代码来源:idebug.c


示例8: SynthPortValid

NTSTATUS
SynthPortValid(
    IN OUT PGLOBAL_SYNTH_INFO pGDI,
    IN     ULONG Port,
    IN     volatile BOOLEAN * Fired
)
{
    NTSTATUS Status;

    //
    // Check we're going to be allowed to use this port or whether
    // some other device thinks it owns this hardware
    //

    Status = SoundReportResourceUsage(
                 pGDI->DeviceObject,
                 pGDI->BusType,
                 pGDI->BusNumber,
                 NULL,
                 0,
                 FALSE,
                 NULL,
                 &Port,
                 NUMBER_OF_SYNTH_PORTS);

    if (!NT_SUCCESS(Status)) {
        return Status;
    }

    //
    // Find where our device is mapped
    //

    pGDI->Hw.SynthBase = SoundMapPortAddress(
                               pGDI->BusType,
                               pGDI->BusNumber,
                               Port,
                               NUMBER_OF_SYNTH_PORTS,
                               &pGDI->MemType);
    {
        PUCHAR base;

        base = pGDI->Hw.SynthBase;

        if (!SynthPresent(base, base, Fired)) {

            dprintf1(("No synthesizer present"));

            //
            // Unmap the memory
            //

            SynthCleanup(pGDI);

            return STATUS_DEVICE_CONFIGURATION_ERROR;
        }
    }

    return STATUS_SUCCESS;
}
开发者ID:BillTheBest,项目名称:WinNT4,代码行数:60,代码来源:synth.c


示例9: debug_print_packed_ref

void
debug_print_packed_ref(const ref_packed *pref)
{	ushort elt = *pref;
	ref nref;
	switch ( elt >> packed_type_shift )
	   {
	case pt_executable_operator:
	  dprintf("<op_name>");
	  elt &= packed_int_mask;
	  op_index_ref(elt, &nref);
	  debug_print_ref(&nref);
	  break;
	case pt_integer:
	  dprintf1("<int> %d", (int)(elt & packed_int_mask) + packed_min_intval);
	  break;
	case pt_literal_name: case pt_literal_name+1:
	  dprintf("<lit_name>"); elt &= packed_max_name_index; goto ptn;
	case pt_executable_name: case pt_executable_name+1:
	  dprintf("<exec_name>"); elt &= packed_max_name_index;
ptn:	  name_index_ref(elt, &nref);
	  dprintf2("(0x%lx#%x)", (ulong)nref.value.pname, elt);
	  debug_print_name(&nref);
	  break;
	   }
}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:25,代码来源:idebug.c


示例10: SoundSetVersion

/*****************************************************************************

NOT USED ANYMORE
Routine Description :

    Sets a version DWORD into the registry as a pseudo return code
    to sndblst.drv

    As a side effect the key to the registry entry is closed.

Arguments :

    pGlobalInfo - Our driver global info

    DSPVersion - the version number we want to set

Return Value :

    None

*****************************************************************************/
VOID    SoundSetVersion( IN PGLOBAL_DEVICE_INFO pGlobalInfo,
                       IN ULONG DSPVersion )
{
        /***** Local Variables *****/

    UNICODE_STRING  VersionString;

                /***** Start *****/

    RtlInitUnicodeString(&VersionString,
                        L"DSP Version");

    if ( pGlobalInfo->RegistryPathName )
        {
        NTSTATUS    SetStatus;

        SetStatus = SoundWriteRegistryDWORD( pGlobalInfo->RegistryPathName,
                                           L"DSP Version",
                                           DSPVersion );

        if (!NT_SUCCESS(SetStatus))
            {
            dprintf1(("ERROR: SoundSetVersion(): Failed to write version - status %XH", SetStatus));
            }
        }           // End IF (pGlobalInfo->RegistryPathName)

}
开发者ID:BillTheBest,项目名称:WinNT4,代码行数:48,代码来源:config.c


示例11: SoundInitInterrupt

/*****************************************************************************
    SoundInitInterrupt()

*****************************************************************************/
NTSTATUS    SoundInitInterrupt( IN OUT PGLOBAL_DEVICE_INFO pGDI,
                             IN OUT PULONG              Interrupt )
{
        /***** Local Variables *****/

    NTSTATUS            Status;

                /***** Start *****/

    dprintf4(("SoundInitInterrupt(): Start"));

    //
    // See if we can get this interrupt
    //

    Status = SoundConnectInterrupt(*Interrupt,
                                   pGDI->BusType,
                                   pGDI->BusNumber,
                                   SoundISR,
                                  (PVOID)pGDI,
                                   INTERRUPT_MODE,
                                   IRQ_SHARABLE,
                                  &pGDI->WaveInfo.Interrupt );

    if (!NT_SUCCESS(Status))
        {
        dprintf1(("ERROR: SoundInitInterrupt(): SoundConnectInterrupt() Failed with Status = %XH",
                                        Status));
        return Status;
        }           // End IF (!NT_SUCCESS(Status))

    return STATUS_SUCCESS;

}           // End SoundInitInterrupt()
开发者ID:BillTheBest,项目名称:WinNT4,代码行数:38,代码来源:config.c


示例12: GenerateInterrupt

 void GenerateInterrupt(void)
 {
    /*
     *  Generate 1 interrupt on the master controller
     *  (how do devices normally 'detect' the hardware? and
     *  how can this VDD find a spare interrupt to 'install'
     *  the device?).
     */

     if (/*InterruptAcknowleged*/TRUE) {

        /*
         *  Set to FALSE FIRST to avoid race conditions
         */

         InterruptAcknowleged = FALSE;
         dprintf2(("Generating interrupt"));
         VDDSimulateInterrupt(ICA_MASTER, SB_INTERRUPT, 1);
     } else {
         dprintf1(("Missed interrupt !"));
     }

    /*
     *  Set the status to see if more apps will work
     */

     WriteStatus = 0xFF;
 }
开发者ID:chunhualiu,项目名称:OpenNT,代码行数:28,代码来源:vdd.c


示例13: journalResetore

int journalResetore(u32 device)
{	// copys apa headers from apal to apa system
	int i;
	u32 sector;
	apa_cache *clink;

	dprintf1("ps2hdd: checking log...\n");
	if(atadDmaTransfer(device, &journalBuf, APA_SECTOR_APAL, sizeof(apa_journal_t)/512, ATAD_MODE_READ)){
		journalReset(device);
		return -EIO;
	}
	if(journalBuf.magic==APAL_MAGIC)
	{
		if(journalBuf.num==0)
			return 0;
		clink=cacheGetFree();
		for(i=0, sector=APA_SECTOR_APAL_HEADERS;i<journalBuf.num;i++, sector+=2)
		{
			if(atadDmaTransfer(device, clink->header, sector, 2, ATAD_MODE_READ))
				break;
			if(atadDmaTransfer(device, clink->header, journalBuf.sectors[i], 2, ATAD_MODE_WRITE))
				break;
		}
		cacheAdd(clink);
		return journalReset(device);// only do if journal..
	}
	memset(&journalBuf, 0, sizeof(apa_journal_t));// safe e
	journalBuf.magic=APAL_MAGIC;
	return 0;//-EINVAL;
}
开发者ID:EvertonSilva,项目名称:ps2sdk,代码行数:30,代码来源:journal.c


示例14: ss_handleUNC

/* UNC handling
 *
 * client can pass us a SSREQ_UNC: this contains both a password and a server
 * name (in the form \\server\share). We make a connection to it here and
 * remember the connection so that we can remove it (in ss_cleanconnections)
 * when the client session terminates.
 *
 * We are passed the head of a FNAMELIST in which we should store the connect
 * name for later cleanup. We return the new head of this list.
 *
 * the client will send this request if a unc-style named scan fails
 * with the SSRESP_BADPASS error.
 */
PFNAMELIST
ss_handleUNC( HANDLE hpipe, long lVersion
            , LPSTR password, LPSTR server, PFNAMELIST connects)
{
        NETRESOURCE resource;
        int errorcode;

        resource.lpRemoteName = server;
        resource.lpLocalName = NULL;
        resource.dwType = RESOURCETYPE_DISK;
        resource.lpProvider = NULL;

        errorcode = (int)WNetAddConnection2(&resource, password, NULL, 0);
        if (errorcode == NO_ERROR) {

                /* remember the connection name */
                connects = ss_addtolist(connects, server);

                /* report success */
                ss_sendnewresp( hpipe, lVersion, SSRESP_END
                              , 0, 0, 0, 0, NULL);
        } else {
    		Log_Write(hlogErrors, "Connect error %d for server %s", GetLastError(), server);
                dprintf1(("connect error %d for server %s\n", GetLastError(), server));
                /* report error */
                ss_sendnewresp( hpipe, lVersion, SSRESP_ERROR
                              , 0, 0, 0, 0, NULL);
        }
        return(connects);
} /* ss_handleUNC */
开发者ID:mingpen,项目名称:OpenNT,代码行数:43,代码来源:scan.c


示例15: EnqueueName

/* Attempt to Queue.Put Path onto Queue as a FILEDETAILS
   with default values for all other fields.
   Return TRUE or FALSE according as it succeeded.
*/
STATIC BOOL EnqueueName(QUEUE Queue, LPSTR Path, UINT BuffLen)
{
        FILEDETAILS fd;

        /* unpack Path and LocalName from "superstring" */
        strcpy(fd.Path, Path);
        BuffLen -= (strlen(Path)+1);
        if (BuffLen<0) return FALSE;  // Uh oh! strlen just looked at garbage.
        Path += strlen(Path)+1;
        BuffLen -= (strlen(Path)+1);
        if (BuffLen<0) return FALSE;  // Uh oh! strlen just looked at garbage.
        strcpy(fd.LocalName, Path);

        /* set defaults for every field */
        fd.ErrorCode = 0;
        fd.ft_lastwrite.dwLowDateTime = 0;
        fd.ft_lastwrite.dwHighDateTime = 0;
        fd.ft_create.dwLowDateTime = 0;
        fd.ft_create.dwHighDateTime = 0;
        fd.ft_lastaccess.dwLowDateTime = 0;
        fd.ft_lastaccess.dwHighDateTime = 0;
        fd.fileattribs = 0;
        fd.SizeHi = 0;
        fd.SizeLo = 0;
        fd.Checksum = 0;
        fd.TempName[0] = '\0';

        if(!Queue_Put(Queue, (LPBYTE)&fd, sizeof(fd))){
                dprintf1(("Put to pack queue failed\n"));
                return FALSE;
        }
        return TRUE;
} /* EnqueueName */
开发者ID:mingpen,项目名称:OpenNT,代码行数:37,代码来源:files.c


示例16: pid_load_vaddrs

int pid_load_vaddrs(int pid)
{
	int ret;

	dprintf2("%s(%d)\n", __func__, pid);
	if (!ranges) {
		nr_ranges_allocated = 4;
		ranges = malloc(nr_ranges_allocated * sizeof(ranges[0]));
		dprintf2("%s(%d) allocated %d ranges @ %p\n", __func__, pid,
			 nr_ranges_allocated, ranges);
		assert(ranges != NULL);
	}
	do {
		ret = __pid_load_vaddrs(pid);
		if (!ret)
			break;
		if (ret == -E2BIG) {
			dprintf2("%s(%d) need to realloc\n", __func__, pid);
			nr_ranges_allocated *= 2;
			ranges = realloc(ranges,
					nr_ranges_allocated * sizeof(ranges[0]));
			dprintf2("%s(%d) allocated %d ranges @ %p\n", __func__,
					pid, nr_ranges_allocated, ranges);
			assert(ranges != NULL);
			dprintf1("reallocating to hold %d ranges\n", nr_ranges_allocated);
		}
	} while (1);

	dprintf2("%s(%d) done\n", __func__, pid);

	return ret;
}
开发者ID:AK101111,项目名称:linux,代码行数:32,代码来源:mpx-dig.c


示例17: dtrace_dof_fini

static void pragma_fini
dtrace_dof_fini(void)
{
	int fd;

	if ((fd = open64(devname, O_RDWR)) < 0) {
		dprintf1(1, "failed to open helper device %s", devname);
		return;
	}

	if ((gen = ioctl(fd, DTRACEHIOC_REMOVE, gen)) == -1)
		dprintf1(1, "DTrace ioctl failed to remove DOF (%d)\n", gen);
	else
		dprintf1(1, "DTrace ioctl removed DOF (%d)\n", gen);

	(void) close(fd);
}
开发者ID:HackLinux,项目名称:linux,代码行数:17,代码来源:drti.c


示例18: dprintf

// This way of handling positivity violations is
// not continuous in time.  One would have to
// transition gradually from one level to another.
// stringencyLevel should be changed to double
// (integer values could serve as points where
// complete transition is made).
//
void PositivityState::increaseStringency()
{
    if(stringencyLevel==AVERAGE)
    {
        dprintf("increasing stringency level to POSITIVITY_POINTS");
        stringencyLevel = POSITIVITY_POINTS;
        repeatStageFlag = true;
    }
    //else if(stringencyLevel==POSITIVITY_POINTS)
    //{
    //  dprintf("increasing stringency level to IMPLICIT_SOURCE");
    //  stringencyLevel = IMPLICIT_SOURCE;
    //  repeatStepFlag = true;
    //}
    //else if(stringencyLevel==IMPLICIT_SOURCE)
    else if(stringencyLevel==POSITIVITY_POINTS)
    {
        // make this number configurable?
        // could rescale based on comparison
        // of minval with minval computed with
        // larger time step.
        //
        // want to modify dt by a factor that will
        // cause minval to be zero.
        //
        // time step must be repeated if step length is changed.
        repeatStepFlag = true;
#if 0
        if(suggested_dt_changeFactor < .8)
            dt_changeFactor = .8;
        else if(suggested_dt_changeFactor > .95)
            dt_changeFactor = .95;
        else
            dt_changeFactor = suggested_dt_changeFactor;
#endif
        //double dt_changeFactor = .95;
        //cflFactor *= dt_changeFactor;
        cflFactor -= .0625;
        //dt *= dt_changeFactor;
        //dprint(dt);
        dprintf1("decreased cflFactor to %f",cflFactor);
        // if cflFactor gets too small something must have gone wrong.
        // There should exist a positivity-guaranteeing CFL number
        // that is independent of the solution (assuming that there
        // is a positivity-guaranteeing CFL number that is independent
        // of the solution for the HLLE method, which maybe isn't quite
        // true because we don't have a perfect way to obtain an upper
        // bound on physical wave speeds for the Riemann problem between
        // two cell states (Einfeldt's prescription is a not a guarantee
        // for all strictly hyperbolic systems).
        //assert_gt(cflFactor, .08);
        assert_gt(cflFactor, 0.);
    }
    else
    {
        invalid_value_error(stringencyLevel);
    }
}
开发者ID:smoe1,项目名称:ImplicitExplicit,代码行数:65,代码来源:Positivity.cpp


示例19: mpuWrite

BOOLEAN
mpuWrite(
    PSOUND_HARDWARE pHw,
    UCHAR value
)
/*++

Routine Description:

    Write a command or data to the MPU

Arguments:

    pHw - Pointer to the device extension data
    value - the value to be written

Return Value:

    TRUE if written correctly , FALSE otherwise

--*/
{
    ULONG uCount;

    ASSERT(pHw->Key == HARDWARE_KEY);

    uCount = 100;

    while (uCount--) {
        int InnerCount;

        HwEnter(pHw);

        //
        // Inner count loop protects against dynamic deadlock with
        // midi.
        //

        for (InnerCount = 0; InnerCount < 10; InnerCount++) {
            if (!(INPORT(pHw, MPU_STATUS_PORT) & 0x40)) {  // is it ok to send data (bit 6 clear)? - drude
                OUTPORT(pHw, MPU_DATA_PORT, value);
                break;
            }
            KeStallExecutionProcessor(1); // 1 us
        }

        HwLeave(pHw);

        if (InnerCount < 10) {
            return TRUE;
        }
    }

    dprintf1(("mpuWrite:Failed to write %x to mpu", (ULONG)value));

    return FALSE;
}
开发者ID:BillTheBest,项目名称:WinNT4,代码行数:57,代码来源:hardware.c


示例20: SoundInitIoPort

/*****************************************************************************

    SoundInitIoPort()

*****************************************************************************/
NTSTATUS    SoundInitIoPort( IN OUT PGLOBAL_DEVICE_INFO pGDI,
                          IN OUT PPAS_CONFIG_DATA ConfigData )
{
        /***** Local Variables *****/

//  NTSTATUS        Status;
    NTSTATUS        PasStatus;

                /***** Start *****/

    //
    // Find where our device is mapped
    //

    dprintf4(("SoundInitIoPort(): Start"));

#if 0
    // Do this in FindPasHardware instead!!
    pGDI->Hw.PortBase = SoundMapPortAddress( pGDI->BusType,
                                            pGDI->BusNumber,
                                            ConfigData->Port,
                                            NUMBER_OF_PAS_PORTS,
                                           &pGDI->MemType);
#else
    pGDI->Hw.PortBase = (PUCHAR) &pGDI->PASInfo.ProPort;
#endif          // 0

    //
    // Try to Locate any ProAudio Spectrums
    //
    PasStatus = FindPasHardware( pGDI,
                                ConfigData );

    if ( !NT_SUCCESS(PasStatus) )
        {
        dprintf1(("ERROR: SoundInitIoPort(): FindPasHardware() Failed with Status = %XH",
                                     PasStatus));
        return STATUS_DEVICE_CONFIGURATION_ERROR;
        }           // End IF (!NT_SUCCESS(PasStatus))

    pGDI->ProAudioSpectrum = TRUE;
    pGDI->Hw.ThunderBoard  = FALSE;

    InitPasAndMixer( pGDI,
                   &pGDI->PASInfo,
                    ConfigData );

    //
    // Setup Min & Max values
    //
    pGDI->MinHz    = MIN_SAMPLE_RATE;
    pGDI->MaxInHz  = MAX_SAMPLE_RATE;
    pGDI->MaxOutHz = MAX_SAMPLE_RATE;

    return STATUS_SUCCESS;

}           // End SoundInitIoPort()
开发者ID:BillTheBest,项目名称:WinNT4,代码行数:62,代码来源:config.c



注:本文中的dprintf1函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ dput函数代码示例发布时间:2022-05-30
下一篇:
C++ dprint函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap