这篇教程C++ BlockMoveData函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中BlockMoveData函数的典型用法代码示例。如果您正苦于以下问题:C++ BlockMoveData函数的具体用法?C++ BlockMoveData怎么用?C++ BlockMoveData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了BlockMoveData函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ResolveFileIDRefpascal OSErr ResolveFileIDRef(ConstStr255Param volName, short vRefNum, long fileID, long *parID, StringPtr fileName){ HParamBlockRec pb; OSErr error; Str255 tempStr; tempStr[0] = 0; if ( volName != NULL ) { BlockMoveData(volName, tempStr, volName[0] + 1); } pb.fidParam.ioNamePtr = (StringPtr)tempStr; pb.fidParam.ioVRefNum = vRefNum; pb.fidParam.ioFileID = fileID; error = PBResolveFileIDRefSync(&pb); if ( error == noErr ) { *parID = pb.fidParam.ioSrcDirID; if ( fileName != NULL ) { BlockMoveData(tempStr, fileName, tempStr[0] + 1); } } return ( error );}
开发者ID:JeanBaptisteArnaud,项目名称:RaspLocalDebug,代码行数:29,
示例2: GetDataAvailableUInt32 RingBuffer::Reallocate(UInt32 inBufferByteSize) { Byte *bptr = NULL; UInt32 data_size = 0; // can't decrease the size at the moment if (inBufferByteSize > mBSize) { bptr = new Byte[inBufferByteSize * 2]; data_size = GetDataAvailable(); if (mNeedsWrapping) { UInt32 headBytes = mBSize - mBStart; BlockMoveData(mBuffer + mBStart, bptr, headBytes); BlockMoveData(mBuffer, bptr + headBytes, mBEnd); mNeedsWrapping = false; } else { BlockMoveData(mBuffer + mBStart, bptr, data_size); } mBEnd = data_size; mBStart = 0; delete[] mBuffer; mBuffer = bptr; mBSize = inBufferByteSize; } return mBSize;}
开发者ID:JanX2,项目名称:XiphQT,代码行数:26,
示例3: LoadImportPLUGvoid LoadImportPLUG( MADLibrary *inMADDriver, short No, FSSpec *theSpec){ Handle theRes; short fileID; Str255 tStr; inMADDriver->ThePlug[ No].file = *theSpec; { Boolean targetIsFolder, wasAliased; ResolveAliasFile( &inMADDriver->ThePlug[ No].file, true, &targetIsFolder, &wasAliased); } pStrCpy( inMADDriver->ThePlug[ No].filename, inMADDriver->ThePlug[ No].file.name); fileID = FSpOpenResFile( theSpec, fsCurPerm); /** CODE du Plug-in **/ GetIndString( tStr, 1000, 1); BlockMoveData( tStr + 1, &inMADDriver->ThePlug[ No].type, 4); inMADDriver->ThePlug[ No].type[ 4] = 0; GetIndString( tStr, 1000, 2); BlockMoveData( tStr + 1, &inMADDriver->ThePlug[ No].mode, 4); GetIndString( inMADDriver->ThePlug[ No].MenuName, 1000, 3); GetIndString( inMADDriver->ThePlug[ No].AuthorString, 1000, 4); CloseResFile( fileID);}
开发者ID:mctully,项目名称:tntbasic,代码行数:33,
示例4: GetFullPathOSErr GetFullPath( const FSSpec* spec, Str255 fullPath){ CInfoPBRec myPB; Str255 dirName; OSErr myErr; fullPath[0] = '/0'; BlockMoveData(spec->name, fullPath, spec->name[spec->name[0]]+1 ); myPB.dirInfo.ioNamePtr = dirName; myPB.dirInfo.ioVRefNum = spec->vRefNum; myPB.dirInfo.ioDrParID = spec->parID; myPB.dirInfo.ioFDirIndex = -1; do{ myPB.dirInfo.ioDrDirID = myPB.dirInfo.ioDrParID; myErr = PBGetCatInfoSync(&myPB); dirName[0]++; dirName[ dirName[0] ]=':'; if( dirName[0]+fullPath[0]>=254 ){ fullPath[0]=0; return 1; } BlockMoveData(fullPath+1, dirName+dirName[0]+1, fullPath[0]); dirName[0]+=fullPath[0]; BlockMoveData(dirName, fullPath, dirName[0]+1); }while( !(myPB.dirInfo.ioDrDirID == fsRtDirID) ); return noErr; }
开发者ID:1c0n,项目名称:xbmc,代码行数:27,
示例5: NScanResourcevoid NScanResource( MADLibrary *inMADDriver){ short i; #define BASERES 1000 for( i = 0; i < MAXPLUG; i++) { Boolean ResourceOK; Handle aRes, bRes; ResourceOK = true; aRes = MADGet1Resource( 'CODE', BASERES + i, inMADDriver); if( aRes == NULL) ResourceOK = false; else { DisposeHandle( aRes); aRes = NULL; } bRes = MADGet1Resource( 'STR#', BASERES + i, inMADDriver); if( bRes == NULL) ResourceOK = false; else { DisposeHandle( bRes); bRes = NULL; } if( inMADDriver->TotalPlug < MAXPLUG && ResourceOK == true) { short No = inMADDriver->TotalPlug; Handle theRes; Str255 tStr; // theName = LMGetCurApName(); HGetVol( NULL, &inMADDriver->ThePlug[ No].file.vRefNum, &inMADDriver->ThePlug[ No].file.parID); pStrCpy( inMADDriver->ThePlug[ No].file.name, RSRCNAME); /** CODE du Plug-in **/ GetIndString( tStr, BASERES+i, 1); BlockMoveData( tStr + 1, &inMADDriver->ThePlug[ No].type, 4); inMADDriver->ThePlug[ No].type[ 4] = 0; GetIndString( tStr, BASERES+i, 2); BlockMoveData( tStr + 1, &inMADDriver->ThePlug[ No].mode, 4); GetIndString( inMADDriver->ThePlug[ No].MenuName, BASERES+i, 3); GetIndString( inMADDriver->ThePlug[ No].AuthorString, BASERES+i, 4); inMADDriver->TotalPlug++; } }}
开发者ID:mctully,项目名称:tntbasic,代码行数:56,
示例6: CopyCatalogNodeInfostatic void CopyCatalogNodeInfo( CatalogRecord *src, CatalogRecord *dest ){ dest->hfsFile.dataLogicalSize = src->hfsFile.dataLogicalSize; dest->hfsFile.dataPhysicalSize = src->hfsFile.dataPhysicalSize; dest->hfsFile.rsrcLogicalSize = src->hfsFile.rsrcLogicalSize; dest->hfsFile.rsrcPhysicalSize = src->hfsFile.rsrcPhysicalSize; dest->hfsFile.modifyDate = src->hfsFile.modifyDate; BlockMoveData( src->hfsFile.dataExtents, dest->hfsFile.dataExtents, sizeof(HFSExtentRecord) ); BlockMoveData( src->hfsFile.rsrcExtents, dest->hfsFile.rsrcExtents, sizeof(HFSExtentRecord) );}
开发者ID:0xffea,项目名称:xnu,代码行数:10,
示例7: LinkHeadersstatic CWResult LinkHeaders(CWPluginContext context, XPIDLSettings& settings){ // find out how many files there are to link. long fileCount = 0; CWResult err = CWGetProjectFileCount(context, &fileCount); if (err != cwNoErr || fileCount == 0) return err; // get the output directory. FSSpec outputDir; err = CWGetOutputFileDirectory(context, &outputDir); if (!CWSUCCESS(err)) return err; // enumerate all of the output header files, and make aliases to them in // the output directory. for (long index = 0; (err == cwNoErr) && (index < fileCount); index++) { // get the name of each output file. CWFileSpec outputFile; err = CWGetStoredObjectFileSpec(context, index, &outputFile); if (err == cwNoErr) { FInfo info; err = FSpGetFInfo(&outputFile, &info); FSSpec aliasFile = { outputDir.vRefNum, outputDir.parID }; BlockMoveData(outputFile.name, aliasFile.name, 1 + outputFile.name[0]); AliasHandle alias = NULL; if (NewAliasMinimal(&outputFile, &alias) == noErr) { // recreate the alias file from scratch. FSpDelete(&aliasFile); FSpCreateResFile(&aliasFile, info.fdCreator, info.fdType, smRoman); short refNum = FSpOpenResFile(&aliasFile, fsRdWrPerm); if (refNum != -1) { UseResFile(refNum); AddResource(Handle(alias), rAliasType, 0, aliasFile.name); ReleaseResource(Handle(alias)); UpdateResFile(refNum); CloseResFile(refNum); } // finally, mark the newly created file as an alias file. FSpGetFInfo(&aliasFile, &info); info.fdFlags |= kIsAlias; FSpSetFInfo(&aliasFile, &info); } } } // create the target file in the output directory. BlockMoveData(settings.output, outputDir.name, 1 + settings.output[0]); FILE* outputFile = FSp_fopen(&outputDir, "w"); if (outputFile != NULL) fclose(outputFile); return err;}
开发者ID:fortunto2,项目名称:celtx,代码行数:55,
示例8: SDL_SYS_CDInitint SDL_SYS_CDInit(void){ SInt16 dRefNum = 0; SInt16 first, last; SDL_numcds = 0; /* Check that the software is available */ if (Gestalt(kGestaltAudioCDSelector, &SDL_cdversion) || !SDL_cdversion) return(0); /* Fill in our driver capabilities */ SDL_CDcaps.Name = SDL_SYS_CDName; SDL_CDcaps.Open = SDL_SYS_CDOpen; SDL_CDcaps.GetTOC = SDL_SYS_CDGetTOC; SDL_CDcaps.Status = SDL_SYS_CDStatus; SDL_CDcaps.Play = SDL_SYS_CDPlay; SDL_CDcaps.Pause = SDL_SYS_CDPause; SDL_CDcaps.Resume = SDL_SYS_CDResume; SDL_CDcaps.Stop = SDL_SYS_CDStop; SDL_CDcaps.Eject = SDL_SYS_CDEject; SDL_CDcaps.Close = SDL_SYS_CDClose; /* Walk the list, count each AudioCD driver, and save the refnums */ first = -1; last = 0 - LMGetUnitTableEntryCount(); for(dRefNum = first; dRefNum >= last; dRefNum--) { Str255 driverName; StringPtr namePtr; DCtlHandle deviceEntry; deviceEntry = GetDCtlEntry(dRefNum); if (! deviceEntry) continue; /* Is this an .AppleCD ? */ namePtr = (*deviceEntry)->dCtlFlags & (1L << dRAMBased) ? ((StringPtr) ((DCtlPtr) deviceEntry)->dCtlDriver + 18) : ((StringPtr) (*deviceEntry)->dCtlDriver + 18); BlockMoveData(namePtr, driverName, namePtr[0]+1); if (driverName[0] > gDriverName[0]) driverName[0] = gDriverName[0]; if (! EqualString(driverName, gDriverName, false, false)) continue; /* Record the basic info for each drive */ SDL_cdlist[SDL_numcds].dRefNum = dRefNum; BlockMoveData(namePtr + 1, SDL_cdlist[SDL_numcds].name, namePtr[0]); SDL_cdlist[SDL_numcds].name[namePtr[0]] = 0; SDL_cdlist[SDL_numcds].hasAudio = false; SDL_numcds++; } return(0);}
开发者ID:3bu1,项目名称:crossbridge,代码行数:51,
示例9: SDL_SYS_CDInitint SDL_SYS_CDInit(void){ SInt16 dRefNum = 0; SInt16 first, last; SDL_numcds = 0; if (Gestalt(kGestaltAudioCDSelector, &SDL_cdversion) || !SDL_cdversion) return(0); SDL_CDcaps.Name = SDL_SYS_CDName; SDL_CDcaps.Open = SDL_SYS_CDOpen; SDL_CDcaps.GetTOC = SDL_SYS_CDGetTOC; SDL_CDcaps.Status = SDL_SYS_CDStatus; SDL_CDcaps.Play = SDL_SYS_CDPlay; SDL_CDcaps.Pause = SDL_SYS_CDPause; SDL_CDcaps.Resume = SDL_SYS_CDResume; SDL_CDcaps.Stop = SDL_SYS_CDStop; SDL_CDcaps.Eject = SDL_SYS_CDEject; SDL_CDcaps.Close = SDL_SYS_CDClose; first = -1; last = 0 - LMGetUnitTableEntryCount(); for(dRefNum = first; dRefNum >= last; dRefNum--) { Str255 driverName; StringPtr namePtr; DCtlHandle deviceEntry; deviceEntry = GetDCtlEntry(dRefNum); if (! deviceEntry) continue; namePtr = (*deviceEntry)->dCtlFlags & (1L << dRAMBased) ? ((StringPtr) ((DCtlPtr) deviceEntry)->dCtlDriver + 18) : ((StringPtr) (*deviceEntry)->dCtlDriver + 18); BlockMoveData(namePtr, driverName, namePtr[0]+1); if (driverName[0] > gDriverName[0]) driverName[0] = gDriverName[0]; if (! EqualString(driverName, gDriverName, false, false)) continue; SDL_cdlist[SDL_numcds].dRefNum = dRefNum; BlockMoveData(namePtr + 1, SDL_cdlist[SDL_numcds].name, namePtr[0]); SDL_cdlist[SDL_numcds].name[namePtr[0]] = 0; SDL_cdlist[SDL_numcds].hasAudio = false; SDL_numcds++; } return(0);}
开发者ID:qtekfun,项目名称:htcDesire820Kernel,代码行数:51,
示例10: PutFileOSErr PutFile (ConstStr255Param thePrompt, ConstStr255Param theFileName, FSSpecPtr theFSSpecPtr, Boolean *theIsSelected, Boolean *theIsReplacing){ NavReplyRecord myReply; NavDialogOptions myDialogOptions; NavEventUPP myEventUPP = NewNavEventUPP(HandleNavEvent); OSErr myErr = noErr; if ((theFSSpecPtr == NULL) || (theIsSelected == NULL) || (theIsReplacing == NULL)) return(paramErr); // assume we are not replacing an existing file *theIsReplacing = false; *theIsSelected = false; // specify the options for the dialog box NavGetDefaultDialogOptions(&myDialogOptions); myDialogOptions.dialogOptionFlags += kNavNoTypePopup; myDialogOptions.dialogOptionFlags += kNavDontAutoTranslate; BlockMoveData(theFileName, myDialogOptions.savedFileName, theFileName[0] + 1); BlockMoveData(thePrompt, myDialogOptions.message, thePrompt[0] + 1); // prompt the user for a file myErr = NavPutFile(NULL, &myReply, &myDialogOptions, myEventUPP, MovieFileType, sigMoviePlayer, NULL); if ((myErr == noErr) && myReply.validRecord) { AEKeyword myKeyword; DescType myActualType; Size myActualSize = 0; // get the FSSpec for the selected file if (theFSSpecPtr != NULL) myErr = AEGetNthPtr(&(myReply.selection), 1, typeFSS, &myKeyword, &myActualType, theFSSpecPtr, sizeof(FSSpec), &myActualSize); *theIsSelected = myReply.validRecord; if (myReply.validRecord) { *theIsReplacing = myReply.replacing; } NavDisposeReply(&myReply); } DisposeNavEventUPP(myEventUPP); return(myErr);}
开发者ID:ArmoredPidgin,项目名称:pidgin-hardened,代码行数:48,
示例11: moverightvoid moveright (ptrvoid psource, ptrvoid pdest, long length) { /* do a mass memory move with the right edge leading. good for opening up a gap in a buffer, among other things C++ BlockNumberIsValid函数代码示例 C++ Blob函数代码示例
|