locked
C++ direct2d Filepicker keeps crashing out with out of bounds exception.

    Question

  • 	FileOpenPicker^ openPicker = ref new FileOpenPicker();
        openPicker->ViewMode = PickerViewMode::Thumbnail;
    	openPicker->SuggestedStartLocation = PickerLocationId::DocumentsLibrary;
        openPicker->FileTypeFilter->Append(".slb");
    	
    	create_task(openPicker->PickSingleFileAsync()).then([this](StorageFile^ file)
            {
                if (file)
                {
                  auto stream = create_task(file->OpenAsync(FileAccessMode::Read)).then([this, file](IRandomAccessStream^ readStream){
    	
    		DataReader^ dr = ref new
    		DataReader(readStream); //requires input stream
    
    
    		create_task(dr->LoadAsync((UINT)readStream->Size));
    			  
    		int cx,di,si,wurd;			
                di = 1;
    readlp:
                wurd = (UINT16)rev(dr->ReadInt16());
    		
            


    n.Wright

    Wednesday, June 20, 2012 1:12 AM

All replies

  • Where is this called from and where does this crash?

    --Rob

    Thursday, June 21, 2012 1:26 AM
    Owner
  • Where is this called from and where does this crash?

    --Rob

    It turned out to be the complier not allowing me to write to the documents folder.

    For some reason the appmanifest wont allow it.

    I have told MS so hope they will fix it.


    n.Wright

    Thursday, June 21, 2012 10:39 PM